Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

13291 hide channels #13876

Merged
merged 2 commits into from
Mar 18, 2024
Merged

13291 hide channels #13876

merged 2 commits into from
Mar 18, 2024

Conversation

endulab
Copy link
Contributor

@endulab endulab commented Mar 7, 2024

What does the PR do

Extend chats model with channel permissions info and hideIfPermissionsNotMet.
Visibility of chat item is based on: member roles, channel permissions, hideIfPermissionsNotMet.
If all channels from category are hidden, category item is also hidden.
If all channels in community are hidden, information label is displayed.

Related status-go pr

Issue #13291

hide-channels.mov

@status-im-auto
Copy link
Member

status-im-auto commented Mar 7, 2024

Jenkins Builds

Click to see older builds (12)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 3ef2189 #1 2024-03-07 10:13:53 ~7 min tests/nim 📄log
✔️ 3ef2189 #1 2024-03-07 10:14:17 ~7 min macos/aarch64 🍎dmg
✔️ 3ef2189 #1 2024-03-07 10:16:58 ~10 min tests/ui 📄log
✔️ 3ef2189 #1 2024-03-07 10:18:49 ~12 min macos/x86_64 🍎dmg
✔️ 3ef2189 #1 2024-03-07 10:23:34 ~16 min linux/x86_64 📦tgz
✔️ 3ef2189 #1 2024-03-07 10:38:46 ~32 min windows/x86_64 💿exe
✔️ eca5b7b #2 2024-03-18 12:28:37 ~5 min macos/aarch64 🍎dmg
✔️ eca5b7b #2 2024-03-18 12:29:07 ~6 min tests/nim 📄log
✔️ eca5b7b #2 2024-03-18 12:32:43 ~9 min macos/x86_64 🍎dmg
✔️ eca5b7b #2 2024-03-18 12:34:17 ~11 min tests/ui 📄log
✔️ eca5b7b #2 2024-03-18 12:38:39 ~15 min linux/x86_64 📦tgz
✔️ eca5b7b #2 2024-03-18 12:47:44 ~24 min windows/x86_64 💿exe
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ eca9b29 #3 2024-03-18 14:27:52 ~4 min macos/aarch64 🍎dmg
✔️ eca9b29 #3 2024-03-18 14:29:18 ~5 min tests/nim 📄log
✔️ eca9b29 #3 2024-03-18 14:31:05 ~7 min macos/x86_64 🍎dmg
✔️ eca9b29 #3 2024-03-18 14:33:30 ~9 min tests/ui 📄log
✔️ 0556f69 #4 2024-03-18 14:42:07 ~3 min macos/aarch64 🍎dmg
✔️ 0556f69 #4 2024-03-18 14:44:18 ~6 min tests/nim 📄log
✔️ 0556f69 #4 2024-03-18 14:45:17 ~6 min macos/x86_64 🍎dmg
✔️ 0556f69 #4 2024-03-18 14:48:47 ~10 min tests/ui 📄log
✔️ 0556f69 #4 2024-03-18 14:54:33 ~16 min linux/x86_64 📦tgz
✔️ 0556f69 #4 2024-03-18 15:03:16 ~24 min windows/x86_64 💿exe

Copy link
Member

@jrainville jrainville left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job

@@ -227,6 +263,18 @@ QtObject:
defer: index.delete
self.dataChanged(index, index, @[ModelRole.CategoryOpened.int])

proc changeCategoryItemIfHiddenBecauseNoPermitted*(self: Model, id: string) =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess you made a typo?

Suggested change
proc changeCategoryItemIfHiddenBecauseNoPermitted*(self: Model, id: string) =
proc changeCategoryItemIsHiddenBecauseNotPermitted*(self: Model, id: string) =

src/app/modules/main/chat_section/model.nim Show resolved Hide resolved
ui/app/AppLayouts/Chat/views/ChatView.qml Outdated Show resolved Hide resolved
Copy link
Contributor

@igor-sirotin igor-sirotin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
So much bootstraping needed for a single new property 😢

…d to view and hideIfPermissionsNotMet is set

Extend chats model with channel permissions info and hideIfPermissionsNotMet.
Visibility of chat item is based on: member roles, channel permissions, hideIfPermissionsNotMet.
If all channels from category are hidden, category item is also hidden.
If all chats in community are hidden, infomration label is displayed.

Issue #13291
Copy link
Member

@jrainville jrainville left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work

@jrainville jrainville merged commit 9ed38bd into master Mar 18, 2024
8 checks passed
@jrainville jrainville deleted the 13291-hide-channels branch March 18, 2024 17:33
Khushboo-dev-cpp pushed a commit that referenced this pull request Mar 19, 2024
* feat(@desktop/communities): Hide channels if the user is not permitted to view and hideIfPermissionsNotMet is set

Extend chats model with channel permissions info and hideIfPermissionsNotMet.
Visibility of chat item is based on: member roles, channel permissions, hideIfPermissionsNotMet.
If all channels from category are hidden, category item is also hidden.
If all chats in community are hidden, infomration label is displayed.

Issue #13291

* chore(@desktop): Upgrade status-go

Issue #13291
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants