Commit a50d4bc
Move channel-preset capability check into ConversationUtils.isChannel
isChannel() was a raw attribute check, so every caller had to repeat
"conversation.isChannel() && hasSpreedFeatureCapability(..., ANNOUNCEMENT_PRESET)"
themselves. Renamed the raw checks to isChannelAttribute()/
isAnnouncementAttribute() (mirroring isClassifiedAttribute()) and added
a capability-gated isChannel(conversation, spreedCapabilities), mirroring
the existing isClassified()/isClassifiedAttribute() split. Callers now
call ConversationUtils.isChannel(...) directly.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>1 parent 5410c0a commit a50d4bc
5 files changed
Lines changed: 13 additions & 17 deletions
File tree
- app/src/main/java/com/nextcloud/talk
- chat
- viewmodels
- conversationinfo/viewmodel
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
179 | 178 | | |
180 | 179 | | |
181 | 180 | | |
| |||
1973 | 1972 | | |
1974 | 1973 | | |
1975 | 1974 | | |
1976 | | - | |
1977 | | - | |
1978 | | - | |
1979 | | - | |
| 1975 | + | |
1980 | 1976 | | |
1981 | 1977 | | |
1982 | 1978 | | |
| |||
2249 | 2245 | | |
2250 | 2246 | | |
2251 | 2247 | | |
2252 | | - | |
2253 | | - | |
| 2248 | + | |
2254 | 2249 | | |
2255 | 2250 | | |
2256 | 2251 | | |
| |||
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
1310 | 1310 | | |
1311 | 1311 | | |
1312 | 1312 | | |
1313 | | - | |
1314 | | - | |
| 1313 | + | |
1315 | 1314 | | |
1316 | 1315 | | |
1317 | 1316 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
| |||
1375 | 1374 | | |
1376 | 1375 | | |
1377 | 1376 | | |
1378 | | - | |
| 1377 | + | |
1379 | 1378 | | |
1380 | 1379 | | |
1381 | 1380 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
| |||
422 | 421 | | |
423 | 422 | | |
424 | 423 | | |
425 | | - | |
426 | | - | |
| 424 | + | |
427 | 425 | | |
428 | 426 | | |
429 | 427 | | |
| |||
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
70 | 75 | | |
71 | 76 | | |
72 | 77 | | |
| |||
0 commit comments