this should have no effect but it should ensure "current" is not falsely set to true if the method storeProfile will be used for more scenarios in the future.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
just refactoring for now. this doesn't solve the bug!
Problem that needs to be solved:
When adding a new Account (User), it is marked as "current", while for the other logged in users "current" must be unset (-> disabled).
The problem is, that for the old active user, "current" is not unset so there were multiple accounts marked as "current".
In the ChooseAccountDialogFragment, only one of the current accounts is shown at the top. Below the set status field, all accounts are listed that are not marked with "current". So as a result, there can be accounts hidden that were marked as "current".
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
-> add callback methods to ConductorRemapping to execute after chat room was left. Whenever there is a ChatController on top, it's room is now left, before replacing the controller or pushing another one on top.
this avoids problems where entering a chat before the old one was left led to sessionId="0" for the new chat.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
when opening a chat notification, the old chat should not be kept in the backstack. so when clicking the back button when coming from a chat that was opened by a notification, now the ConversationList opens.
by the way, this also avoids to run into bug #2181 (but it's root cause is not solved yet)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
# reproduce:
1. click in chat where someone is mentioned.
2. click on the mention
3. go back to first chat
# result:
validSessionId() can be false in onDetach for the second chat when going back to first chat
-> leaveRoom is not executed
-> disposable is not disposed
-> getRoomInfo() continues to execute for old controller
-> e.g. appbar infos can be wrong (wrong avatar/title)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
set drawable of referenceThumbImage to null. this hopefully avoids that wrong images are loaded from recycler view to wrong messages
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
there was a report that a message contained the link preview of a previous message. This was most likely because of a recycler view error. Hopefully setting empty values should avoid this now.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
for example when call is hangup on mobile and immediately after on web, the loop in "checkIfCallIsActive" is still active and might trigger to send the "missed call" notification. Because of this, there is now another check if the "ongoing call" notification is still visible. It makes only sense to show the missed call notification, when the ongoing call notification is still visible.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
this commit removes the logic to play the ringtone in CallNotificationActivity. Playing ringtone should only be controlled by the notification channel from OS!
furthermore the checks if a call is stopped or is still ongoing etc was removed from CallNotificationActivity. Instead the CallNotificationActivity now is completely dependent on the notification. If the notification is canceled, the Activity stops. If the Notification is ongoing and hangup of accept call is clicked, then the notification is canceled (including the ringtone).
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>