fix: ensure last active community is reset when leaving community

There's a bug where the last active community will be set in local settings
and not removed when a user leaves a community.

This causes the app to start on an invalid screen/state as it still tries to
render the community view for a community that the user has just left.

This commit ensure we're resetting the last active community in the local settings
when a users leaves the community.

Fixes: #4094
This commit is contained in:
Pascal Precht 2021-12-06 11:46:13 +01:00 committed by r4bbit.eth
parent cae7184d3f
commit b92ac455c9
1 changed files with 3 additions and 0 deletions

View File

@ -136,6 +136,9 @@ QtObject {
function leaveCommunity(communityId) {
chatsModelInst.communities.leaveCommunity(communityId);
if (communityId == chatsModelInst.communities.activeCommunity.id) {
localAccountSensitiveSettings.lastModeActiveCommunity = ""
}
}
function setCommunityMuted(communityId, checked) {