mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-12 15:24:39 +00:00
fix(@desktop/chat): ensure proper limit when creating chat
This commit is contained in:
parent
7fad1ed5db
commit
52a34b21d0
@ -12,6 +12,8 @@ import SortFilterProxyModel 0.2
|
||||
MembersSelectorBase {
|
||||
id: root
|
||||
|
||||
limitReached: model.count >= membersLimit - 1 // -1 because creator is not on the list of members when creating chat
|
||||
|
||||
function cleanup() {
|
||||
root.edit.clear()
|
||||
d.selectedMembers.clear()
|
||||
|
@ -19,10 +19,12 @@ InlineSelectorPanel {
|
||||
id: root
|
||||
|
||||
property var rootStore
|
||||
readonly property bool limitReached: model.count >= d.membersLimit
|
||||
|
||||
readonly property int membersLimit: 20 // see: https://github.com/status-im/status-mobile/issues/13066
|
||||
property bool limitReached: model.count >= membersLimit
|
||||
|
||||
label.text: qsTr("To:")
|
||||
warningLabel.text: qsTr("%1 USER LIMIT REACHED").arg(d.membersLimit)
|
||||
warningLabel.text: qsTr("%1 USER LIMIT REACHED").arg(membersLimit)
|
||||
warningLabel.visible: limitReached
|
||||
|
||||
suggestionsModel: SortFilterProxyModel {
|
||||
@ -67,12 +69,6 @@ InlineSelectorPanel {
|
||||
onClicked: root.entryAccepted(this)
|
||||
}
|
||||
|
||||
QtObject {
|
||||
id: d
|
||||
|
||||
readonly property int membersLimit: 20 // see: https://github.com/status-im/status-mobile/issues/13066
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
root.edit.forceActiveFocus()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user