Philipp Hörist pushed to branch mainwindow at gajim / gajim
Commits:
-
a6d61265
by lovetox at 2021-03-07T20:31:42+01:00
1 changed file:
Changes:
| ... | ... | @@ -154,9 +154,22 @@ def get_resource(self, resource): |
| 154 | 154 |
contact = self.add_resource(resource)
|
| 155 | 155 |
return contact
|
| 156 | 156 |
|
| 157 |
+ def get_resources(self):
|
|
| 158 |
+ resources = []
|
|
| 159 |
+ for contact in self._resources.values():
|
|
| 160 |
+ if contact.show != PresenceShowExt.OFFLINE:
|
|
| 161 |
+ resources.append(contact)
|
|
| 162 |
+ return resources
|
|
| 163 |
+ |
|
| 164 |
+ def iter_resources(self):
|
|
| 165 |
+ for contact in self._resources.values():
|
|
| 166 |
+ if contact.show != PresenceShowExt.OFFLINE:
|
|
| 167 |
+ yield contact
|
|
| 168 |
+ |
|
| 157 | 169 |
@property
|
| 158 | 170 |
def is_available(self):
|
| 159 |
- return any([contact.is_available for contact in self._resources.values()])
|
|
| 171 |
+ return any([contact.is_available for contact
|
|
| 172 |
+ in self._resources.values()])
|
|
| 160 | 173 |
|
| 161 | 174 |
@property
|
| 162 | 175 |
def show(self):
|