Daniel Brötzmann pushed to branch master at gajim / gajim


Commits:
7682bd8f by wurstsalat at 2022-05-23T14:23:39+02:00
fix: Status: Restore last status correctly

Fixes #10867

- - - - -


2 changed files:

- gajim/common/client.py
- gajim/gui_interface.py


Changes:

=====================================
gajim/common/client.py
=====================================
@@ -371,6 +371,15 @@ def change_status(self, show: str, message: str) -> None:
         if show != 'offline':
             self._status = show
 
+            app.settings.set_account_setting(
+                self._account,
+                'last_status',
+                show)
+            app.settings.set_account_setting(
+                self._account,
+                'last_status_msg',
+                helpers.to_one_line(message))
+
         if self._state.is_disconnecting:
             log.warning('Can\'t change status while '
                         'disconnect is in progress')


=====================================
gajim/gui_interface.py
=====================================
@@ -626,12 +626,6 @@ def change_account_status(self, account: str, status: str) 
-> None:
     def _change_status(account: str, status: str) -> None:
         client = app.get_client(account)
         message = client.status_message
-        if status != 'offline':
-            app.settings.set_account_setting(account, 'last_status', status)
-            app.settings.set_account_setting(
-                account,
-                'last_status_msg',
-                helpers.to_one_line(message))
 
         if status == 'offline':
             # TODO delete pep



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/7682bd8f63a76ec1df8c9801f25805737c794fc8

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/7682bd8f63a76ec1df8c9801f25805737c794fc8
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to