chore(chat): no need to block the input when a permission is pending
Fixes #15143
This commit is contained in:
parent
a36ae5b5e0
commit
0f055afa00
|
@ -45,7 +45,6 @@ Item {
|
||||||
property int chatsCount: parentModule && parentModule.model ? parentModule.model.count : 0
|
property int chatsCount: parentModule && parentModule.model ? parentModule.model.count : 0
|
||||||
property int activeChatType: parentModule && parentModule.activeItem.type
|
property int activeChatType: parentModule && parentModule.activeItem.type
|
||||||
property bool stickersLoaded: false
|
property bool stickersLoaded: false
|
||||||
property bool permissionUpdatePending: false
|
|
||||||
property bool canPost: true
|
property bool canPost: true
|
||||||
property var viewAndPostHoldingsModel
|
property var viewAndPostHoldingsModel
|
||||||
|
|
||||||
|
@ -277,7 +276,6 @@ Item {
|
||||||
&& root.rootStore.sectionDetails.joined
|
&& root.rootStore.sectionDetails.joined
|
||||||
&& !root.rootStore.sectionDetails.amIBanned
|
&& !root.rootStore.sectionDetails.amIBanned
|
||||||
&& root.rootStore.isUserAllowedToSendMessage
|
&& root.rootStore.isUserAllowedToSendMessage
|
||||||
&& !root.permissionUpdatePending
|
|
||||||
}
|
}
|
||||||
|
|
||||||
store: root.rootStore
|
store: root.rootStore
|
||||||
|
@ -297,9 +295,6 @@ Item {
|
||||||
if (!root.rootStore.sectionDetails.joined || root.rootStore.sectionDetails.amIBanned) {
|
if (!root.rootStore.sectionDetails.joined || root.rootStore.sectionDetails.amIBanned) {
|
||||||
return qsTr("You need to join this community to send messages")
|
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) {
|
if (!root.canPost) {
|
||||||
return qsTr("Sorry, you don't have permissions to post in this channel.")
|
return qsTr("Sorry, you don't have permissions to post in this channel.")
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,29 +67,6 @@ StatusSectionLayout {
|
||||||
property var assetsModel
|
property var assetsModel
|
||||||
property var collectiblesModel
|
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: {
|
readonly property bool contentLocked: {
|
||||||
if (!rootStore.chatCommunitySectionModule.isCommunity()) {
|
if (!rootStore.chatCommunitySectionModule.isCommunity()) {
|
||||||
return false
|
return false
|
||||||
|
@ -243,7 +220,6 @@ StatusSectionLayout {
|
||||||
stickersLoaded: root.stickersLoaded
|
stickersLoaded: root.stickersLoaded
|
||||||
emojiPopup: root.emojiPopup
|
emojiPopup: root.emojiPopup
|
||||||
stickersPopup: root.stickersPopup
|
stickersPopup: root.stickersPopup
|
||||||
permissionUpdatePending: root.permissionUpdatePending
|
|
||||||
viewAndPostHoldingsModel: root.viewAndPostPermissionsModel
|
viewAndPostHoldingsModel: root.viewAndPostPermissionsModel
|
||||||
canPost: !root.rootStore.chatCommunitySectionModule.isCommunity() || root.canPost
|
canPost: !root.rootStore.chatCommunitySectionModule.isCommunity() || root.canPost
|
||||||
amISectionAdmin: root.amISectionAdmin
|
amISectionAdmin: root.amISectionAdmin
|
||||||
|
|
Loading…
Reference in New Issue