fix(@desktop/chat): Reopening gif popup open trending

fixes #3491
This commit is contained in:
Anthony Laibe 2021-09-20 14:19:20 +02:00 committed by Iuri Matias
parent 8baa8c7b73
commit 14c4ee6047
1 changed files with 6 additions and 3 deletions

View File

@ -68,6 +68,9 @@ Popup {
} }
onClosed: { onClosed: {
popup.currentCategory = StatusGifPopup.Category.Trending
popup.previousCategory = StatusGifPopup.Category.Trending
if (confirmationPopup.opened) { if (confirmationPopup.opened) {
confirmationPopup.close() confirmationPopup.close()
} }
@ -220,7 +223,7 @@ Popup {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
source: `./assets/img/gif-${Style.current.name}.svg` source: `./assets/img/gif-${Style.current.name}.svg`
} }
StyledText { StyledText {
id: title id: title
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
@ -281,7 +284,7 @@ Popup {
anchors.top: emptyText.bottom anchors.top: emptyText.bottom
anchors.topMargin: Style.current.padding anchors.topMargin: Style.current.padding
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
text: qsTr("Retry") text: qsTr("Retry")
visible: currentCategory === StatusGifPopup.Category.Trending || currentCategory === StatusGifPopup.Category.Search visible: currentCategory === StatusGifPopup.Category.Trending || currentCategory === StatusGifPopup.Category.Search
onClicked: { onClicked: {
@ -289,7 +292,7 @@ Popup {
chatsModel.gif.getTrendings() chatsModel.gif.getTrendings()
return return
} }
searchGif(searchBox.text) searchGif(searchBox.text)
} }
} }