chore(chat): no need to block the input when a permission is pending

Fixes #15143
This commit is contained in:
Jonathan Rainville 2024-06-13 14:03:58 -04:00
parent a36ae5b5e0
commit 0f055afa00
2 changed files with 0 additions and 29 deletions

View File

@ -45,7 +45,6 @@ Item {
property int chatsCount: parentModule && parentModule.model ? parentModule.model.count : 0
property int activeChatType: parentModule && parentModule.activeItem.type
property bool stickersLoaded: false
property bool permissionUpdatePending: false
property bool canPost: true
property var viewAndPostHoldingsModel
@ -277,7 +276,6 @@ Item {
&& root.rootStore.sectionDetails.joined
&& !root.rootStore.sectionDetails.amIBanned
&& root.rootStore.isUserAllowedToSendMessage
&& !root.permissionUpdatePending
}
store: root.rootStore
@ -297,9 +295,6 @@ Item {
if (!root.rootStore.sectionDetails.joined || root.rootStore.sectionDetails.amIBanned) {
return qsTr("You need to join this community to send messages")
}
if (root.permissionUpdatePending) {
return qsTr("Some permissions are being updated. You will be able to send messages once the control node is back online.")
}
if (!root.canPost) {
return qsTr("Sorry, you don't have permissions to post in this channel.")
}

View File

@ -67,29 +67,6 @@ StatusSectionLayout {
property var assetsModel
property var collectiblesModel
readonly property var pendingViewOnlyPermissionsModel: SortFilterProxyModel {
sourceModel: root.viewOnlyPermissionsModel
filters: [
ValueFilter {
roleName: "permissionState"
value: PermissionTypes.State.Approved
inverted: true
}
]
}
readonly property var pendingViewAndPostPermissionsModel: SortFilterProxyModel {
sourceModel: root.viewAndPostPermissionsModel
filters: [
ValueFilter {
roleName: "permissionState"
value: PermissionTypes.State.Approved
inverted: true
}
]
}
readonly property bool permissionUpdatePending: pendingViewOnlyPermissionsModel.count > 0 || pendingViewAndPostPermissionsModel.count > 0
readonly property bool contentLocked: {
if (!rootStore.chatCommunitySectionModule.isCommunity()) {
return false
@ -243,7 +220,6 @@ StatusSectionLayout {
stickersLoaded: root.stickersLoaded
emojiPopup: root.emojiPopup
stickersPopup: root.stickersPopup
permissionUpdatePending: root.permissionUpdatePending
viewAndPostHoldingsModel: root.viewAndPostPermissionsModel
canPost: !root.rootStore.chatCommunitySectionModule.isCommunity() || root.canPost
amISectionAdmin: root.amISectionAdmin