Daniel Brötzmann pushed to branch mainwindow at gajim / gajim
Commits:
-
48b229b9
by wurstsalat at 2021-11-14T01:49:53+01:00
1 changed file:
Changes:
| ... | ... | @@ -18,6 +18,7 @@ |
| 18 | 18 |
from gajim.common import app
|
| 19 | 19 |
from gajim.common import ged
|
| 20 | 20 |
from gajim.common.const import AvatarSize
|
| 21 |
+from gajim.common.helpers import get_connection_status
|
|
| 21 | 22 |
from gajim.common.helpers import get_uf_show
|
| 22 | 23 |
from gajim.common.helpers import get_global_show
|
| 23 | 24 |
from gajim.common.helpers import statuses_unified
|
| ... | ... | @@ -101,16 +102,12 @@ def _on_change_status(self, button): |
| 101 | 102 |
self._status_popover.popdown()
|
| 102 | 103 |
new_status = button.get_name()
|
| 103 | 104 |
app.interface.change_status(status=new_status, account=self._account)
|
| 104 |
- self.update()
|
|
| 105 | 105 |
|
| 106 | 106 |
def update(self, *args, **kwargs):
|
| 107 | 107 |
if self._account is None:
|
| 108 | 108 |
show = get_global_show()
|
| 109 | 109 |
else:
|
| 110 |
- if self._account not in app.connections:
|
|
| 111 |
- return
|
|
| 112 |
- client = app.get_client(self._account)
|
|
| 113 |
- show = client.status
|
|
| 110 |
+ show = get_connection_status(self._account)
|
|
| 114 | 111 |
|
| 115 | 112 |
surface = get_show_circle(
|
| 116 | 113 |
show, AvatarSize.SHOW_CIRCLE, self.get_scale_factor())
|