mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-23 03:58:49 +00:00
fix(CreateCommunityPopup): reset discord filelist when modal is opened
Prior to this commit we would reset the file list (and categories and channels) whenever the `CreateCommunityPopup` was closed. This made sense because at that point we could assume that the user has decided to somehow stop the process of an import, so the next time the modal is opened again, we want that data to be reset. However, it turned out that this introduced a bug in the scenario where and import is running, and while it's running, when the user decides to hide the progress modal, it would reset the warnings count, resulting in the progress banner to show an invalid state until the next progress signal was emitted. We don't want to reset this data every time we close the modal. We only want to reset it when we know there's no import in progress. Fixes #7787
This commit is contained in:
parent
4b8667d384
commit
7706a6caea
@ -74,19 +74,16 @@ StatusStackModal {
|
|||||||
onAboutToShow: {
|
onAboutToShow: {
|
||||||
nameInput.input.edit.forceActiveFocus()
|
nameInput.input.edit.forceActiveFocus()
|
||||||
if (root.isDiscordImport) {
|
if (root.isDiscordImport) {
|
||||||
|
if (!root.store.discordImportInProgress) {
|
||||||
|
root.store.clearFileList()
|
||||||
|
root.store.clearDiscordCategoriesAndChannels()
|
||||||
|
}
|
||||||
for (let i = 0; i < discordPages.length; i++) {
|
for (let i = 0; i < discordPages.length; i++) {
|
||||||
stackItems.push(discordPages[i])
|
stackItems.push(discordPages[i])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onClosed: {
|
|
||||||
if (root.isDiscordImport) {
|
|
||||||
root.store.clearFileList()
|
|
||||||
root.store.clearDiscordCategoriesAndChannels()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
readonly property list<Item> discordPages: [
|
readonly property list<Item> discordPages: [
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: fileListView
|
id: fileListView
|
||||||
|
Loading…
x
Reference in New Issue
Block a user