-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TW-1785: Improve logout for multiple homeserver #1788
TW-1785: Improve logout for multiple homeserver #1788
Conversation
This PR has been deployed to https://linagora.github.io/twake-on-matrix/1788 |
if (matrix.canDeleteToMDatabase == true) { | ||
final hiveCollectionToMDatabase = getIt.get<HiveCollectionToMDatabase>(); | ||
await hiveCollectionToMDatabase.clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not move it inside future loading dialog?
} | ||
|
||
Future<void> _logoutActionsOnWeb() async { | ||
if (matrix.canDeleteToMDatabase == true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idem
lib/widgets/matrix.dart
Outdated
final lastClientTwakeSupport = | ||
widget.clients.where((client) => client.homeserver != null).length == 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still not understand this condition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- please prevent delete all
tom-db
when client logout, only do it when no client available. - try to delete specific client in
tom-db
when this client logout.
41756b9
to
e0d3029
Compare
* TW-1772: Prevent infinity contact loop * TW-1772: Show recent contact in contact tab * TW-1772: Showing no contact in new chat screen * TW-1772: Showing no contact in new group chat screen * TW-1773: review load 0 more participants * TW-1773: listen for roomMember change in chat details * TW-1735: search external contact widget added on search view * TW-1735: update matrix dart sdk * TW-1780: Open screen can connect with Twake Workplace when add another account * TW-1780: Add `app=chat` to parameter whenever call to signup in TWP * TW-1785: Improve logout for multiple homeserver (#1788) * Bump version to v2.5.4 * Update privacy welcome screen * TW-1526: Fix Cannot unmute more than 2 chats at the same time * Bump version to v2.5.5 * TW-1781: change the ci/cd to use flutter 3.22 * TW-1781: remove warning based on new lint version * TW-1781: remove deprecated change to have new change * TW-1781: fix the ci issue * TW-1781: add deprecated and TODO for background and onBackground color * TW-1781 Fix ci failed * Bump version to v2.5.8 * TW-1645: Add counting selected image at send icon (#1803) * TW-1645: Add counting selected image at send icon * TW-1645: Add style file for `media_picker_mixin` * TW-1645: Fix size for counter icon (#1816) * TW-1615: Support auto jump to lastest message when user send an attachments (#1810) * TW-1615: Support auto jump to lastest message when user send an attachment * TW-1615: Support auto jump to lastest message when use copy/paste * hot-fix: members list always have to reload (#1801) * TW-1793: recent chats are not recent (#1800) * hot-fix: fix the index.html loading failed * TW-1356: change action for profile tap * TW-1356: update UI for multiple accounts in setting profile * TW-1356: fix multiple accout with same homeserver can login * TW-1356: fix the avatar not updated when app terminated * hot-fix: fix the problem with index.html file * TW-1635: remove the messages contains reply from search result (#1819) * Switched runners to macos-latest (#1820) * Update metadata to config store kit (#1843) * TW-1698: Add minWidth for group details (#1809) * hot-fix: fix the error l10n not found after build runner build (#1855) * TW-1841: Fix back screen when use go_router and navigator (#1850) * Removed xcbeautify installation because it's preinstalled on runners (#1865) * TW-1787: Improve when leave chat (#1842) * TW-1787: Move UI of action items into context menu widget * TW-1787: Update context menu for chat screen * TW-1787: Update context menu for chat list * TW-1787: Update context menu for pinned screen * TW-1812 Remove X from the search bar when it's empty (#1852) * TW-1812 Remove X from the search bar when it's empty * fixup! TW-1812 Remove X from the search bar when it's empty * README.md Updated picture as management asked to do * Update Feature Graphic for fastlane metadata * Improve tom bootstrap dialog (#979) * Create init client dialog on mobile * Implement new bootstrap dialog for mobile * Implement new on auth screen for web * Prevent back button and back android during loading in homeserver picker * Fix dialog overlap when resizing screen * Fix dialog overlap when resizing screen * Handle error for `_getRecoveryWords` * Handle error for Twake welcome screen * TW-1644: allow access to the gallery is not center (#1815) * TW-1644: allow access to the gallery is not center * TW-1644: close the bottomsheet when go to settings * TW-1644: update style for image picker * TW-1602: when typing shift ctrl, the cursor is dissappear (#1853) * TW-1825: Copy/paste not work in search screen (#1874) * TW-1825: Fix search results aren't displayed correctly when copy/paste * TW-1825: Write unit test for this case * TW-1791: Improve display contacts on multiple homeserver (#1857) * TW-1791: Refresh contacts when switch another account or login new account * TW-1791: Write unit test for this case * TW-1791: Refresh contacts when login or logout * TW-1791: Fix missing `setUpToMServices` when switch account * TW-1836: Move shared media to direct chat profile (#1856) * TW-1836: Add shared media tabs into chat profile * TW-1836: Delete Shared media screen * TW-1836: Update `chat_details` * TW-1869: can not open keyboard when tap on the textfield in IOS (#1877) * Pinned Nix version to 2.22.1 to fix broken build (#1884) Also bumped olm to 3.2.16 * TW-1806: fix image weird display on web (#1866) * TW-1806: add support mime files for web platform, and util method to getTwake supported mimeType * TW-1806: make image have width and height when the error image when display * TW-1806: update mime type when drag/drop, paste and add file * TW-1806: fix wrong display when send HEIC file in android * TW-1806: display avif file in web * TW-1806: if image viewer can't be display by real image, use thumbnail * Tw 1750/improve when upload video (#1875) * TW-1750: add metadate when sending file event * TW-1750: fix typo error int videoMimeTypes * TW-1587: Fix can't open chat when click on notification (#1867) * TW-1777: Changing greeting message: include tag in greeting message (#1881) * Bump version to 2.5.9 --------- Co-authored-by: HuyNguyen <[email protected]> Co-authored-by: --global <[email protected]> Co-authored-by: Dat PHAM HOANG <[email protected]> Co-authored-by: sherlock <[email protected]> Co-authored-by: Nguyen Thai <[email protected]> Co-authored-by: Bùi Trung Hiếu <[email protected]> Co-authored-by: KhaledNjim <[email protected]> Co-authored-by: artembru <[email protected]>
Ticket
Root cause:
When login success, only set value for
authUrl
however when set active to another account we can't set it againWhen logout an account on multi account, the condition for deleting ToM database is wrong
Resolved
authUrl
when we login success and set active to another accountSimulator.Screen.Recording.-.iPhone.14.-.2024-05-21.at.13.15.20.mp4
Screen.Recording.2024-05-22.at.00.22.39.mov