refactor: move all old usages of contacts to the new code
This commit is contained in:
parent
cb7865bd9e
commit
e8eefd8f87
|
@ -27,7 +27,13 @@ StatusAppThreePanelLayout {
|
||||||
|
|
||||||
property var store
|
property var store
|
||||||
|
|
||||||
property var messageStore
|
// Not Refactored
|
||||||
|
// property var messageStore
|
||||||
|
|
||||||
|
// Not Refactored
|
||||||
|
property RootStore rootStore: RootStore {
|
||||||
|
messageStore: root.messageStore
|
||||||
|
}
|
||||||
|
|
||||||
property alias chatColumn: chatColumn
|
property alias chatColumn: chatColumn
|
||||||
property bool stickersLoaded: false
|
property bool stickersLoaded: false
|
||||||
|
@ -58,7 +64,7 @@ StatusAppThreePanelLayout {
|
||||||
|
|
||||||
centerPanel: ChatColumnView {
|
centerPanel: ChatColumnView {
|
||||||
id: chatColumn
|
id: chatColumn
|
||||||
//rootStore: root.rootStore
|
rootStore: root.rootStore
|
||||||
chatGroupsListViewCount: contactColumnLoader.item.chatGroupsListViewCount
|
chatGroupsListViewCount: contactColumnLoader.item.chatGroupsListViewCount
|
||||||
|
|
||||||
onOpenAppSearch: {
|
onOpenAppSearch: {
|
||||||
|
@ -100,7 +106,7 @@ StatusAppThreePanelLayout {
|
||||||
id: contactsColumnComponent
|
id: contactsColumnComponent
|
||||||
ContactsColumnView {
|
ContactsColumnView {
|
||||||
// Not Refactored
|
// Not Refactored
|
||||||
//store: root.rootStore
|
store: root.rootStore
|
||||||
onOpenProfileClicked: {
|
onOpenProfileClicked: {
|
||||||
root.profileButtonClicked();
|
root.profileButtonClicked();
|
||||||
}
|
}
|
||||||
|
@ -123,7 +129,7 @@ StatusAppThreePanelLayout {
|
||||||
id: groupInfoPopupComponent
|
id: groupInfoPopupComponent
|
||||||
GroupInfoPopup {
|
GroupInfoPopup {
|
||||||
// Not Refactored
|
// Not Refactored
|
||||||
//store: root.rootStore
|
store: root.rootStore
|
||||||
pinnedMessagesPopupComponent: chatColumn.pinnedMessagesPopupComponent
|
pinnedMessagesPopupComponent: chatColumn.pinnedMessagesPopupComponent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -155,7 +161,7 @@ StatusAppThreePanelLayout {
|
||||||
MessageContextMenuView {
|
MessageContextMenuView {
|
||||||
id: quickActionMessageOptionsMenu
|
id: quickActionMessageOptionsMenu
|
||||||
// Not Refactored
|
// Not Refactored
|
||||||
// store: root.rootStore
|
store: root.rootStore
|
||||||
// reactionModel: root.rootStore.emojiReactionsModel
|
// reactionModel: root.rootStore.emojiReactionsModel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,7 +162,6 @@ Item {
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
enabled: realChatType === Constants.chatTypeOneToOne
|
enabled: realChatType === Constants.chatTypeOneToOne
|
||||||
// TODO use a store once it is available
|
|
||||||
target: contactsModule.model.list
|
target: contactsModule.model.list
|
||||||
onContactChanged: {
|
onContactChanged: {
|
||||||
if (pubkey === wrapper.chatId) {
|
if (pubkey === wrapper.chatId) {
|
||||||
|
|
|
@ -107,7 +107,6 @@ StatusModal {
|
||||||
Component {
|
Component {
|
||||||
id: membersList
|
id: membersList
|
||||||
CommunityProfilePopupMembersListPanel {
|
CommunityProfilePopupMembersListPanel {
|
||||||
// TODO assign the store on open
|
|
||||||
store: root.store
|
store: root.store
|
||||||
width: stack.width
|
width: stack.width
|
||||||
//% "Members"
|
//% "Members"
|
||||||
|
|
|
@ -61,7 +61,6 @@ ListView {
|
||||||
BlockContactConfirmationDialog {
|
BlockContactConfirmationDialog {
|
||||||
id: blockContactConfirmationDialog
|
id: blockContactConfirmationDialog
|
||||||
onBlockButtonClicked: {
|
onBlockButtonClicked: {
|
||||||
// TODO use a store once it is available
|
|
||||||
contactsModule.blockContact(blockContactConfirmationDialog.contactAddress)
|
contactsModule.blockContact(blockContactConfirmationDialog.contactAddress)
|
||||||
blockContactConfirmationDialog.close()
|
blockContactConfirmationDialog.close()
|
||||||
}
|
}
|
||||||
|
@ -75,7 +74,6 @@ ListView {
|
||||||
//% "Are you sure you want to remove this contact?"
|
//% "Are you sure you want to remove this contact?"
|
||||||
confirmationText: qsTrId("are-you-sure-you-want-to-remove-this-contact-")
|
confirmationText: qsTrId("are-you-sure-you-want-to-remove-this-contact-")
|
||||||
onConfirmButtonClicked: {
|
onConfirmButtonClicked: {
|
||||||
// TODO use a store once it is available
|
|
||||||
if (contactsModule.model.isAdded(removeContactConfirmationDialog.value)) {
|
if (contactsModule.model.isAdded(removeContactConfirmationDialog.value)) {
|
||||||
contactsModule.removeContact(removeContactConfirmationDialog.value);
|
contactsModule.removeContact(removeContactConfirmationDialog.value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ ListView {
|
||||||
|
|
||||||
property Component profilePopupComponent: ProfilePopup {
|
property Component profilePopupComponent: ProfilePopup {
|
||||||
id: profilePopup
|
id: profilePopup
|
||||||
|
store: contactList.store
|
||||||
onClosed: destroy()
|
onClosed: destroy()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue