-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Identical chat display name as current user fix, issues removing…
… / leaving chats, rejecting chat option added
- Loading branch information
Showing
14 changed files
with
156 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import 'package:redux/redux.dart'; | ||
import 'package:syphon/global/print.dart'; | ||
import 'package:syphon/store/auth/actions.dart'; | ||
import 'package:syphon/store/crypto/actions.dart'; | ||
import 'package:syphon/store/index.dart'; | ||
import 'package:syphon/store/rooms/actions.dart'; | ||
|
||
/// | ||
/// Cache Middleware | ||
/// | ||
/// Saves store data to cold storage based | ||
/// on which redux actions are fired. | ||
/// | ||
bool cacheMiddleware(Store<AppState> store, dynamic action) { | ||
switch (action.runtimeType) { | ||
case SetRoom: | ||
case RemoveRoom: | ||
case SetOlmAccount: | ||
case SetOlmAccountBackup: | ||
case SetDeviceKeysOwned: | ||
case SetUser: | ||
case ResetCrypto: | ||
case ResetUser: | ||
printInfo('[initStore] persistor saving from ${action.runtimeType}'); | ||
return true; | ||
default: | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.