Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix restore after export #1274

Merged
merged 1 commit into from
Apr 3, 2024
Merged

Conversation

mkondratek
Copy link
Contributor

@mkondratek mkondratek commented Apr 2, 2024

Fixes #1247.

It could be a temporary solution to the original problem. The ideal solution is to make chat restore idempotent.

Test plan

  1. Export a chat.
  2. Restore the same chat.

@mkondratek mkondratek self-assigned this Apr 2, 2024
@mkondratek mkondratek changed the title mkondratek/fix/restore-after-export @mkondratek Fix restore after export Apr 2, 2024
@mkondratek mkondratek changed the title @mkondratek Fix restore after export Fix restore after export Apr 2, 2024
@@ -40,6 +41,7 @@ class ExportChatsBackgroundable(
.filter { it.internalId != null }
.filter { chat -> if (internalId != null) chat.internalId == internalId else true }

var dummyInternalId = UUID.randomUUID().toString()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it also work for restore all?
Or, in other words, we just need one dummyInternalId or one per restored chat?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need one per chat and that's what I do here (see line 58)

Copy link
Contributor

@pkukielka pkukielka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pkukielka pkukielka merged commit a5b629c into main Apr 3, 2024
13 checks passed
@pkukielka pkukielka deleted the mkondratek/fix/restore-after-export branch April 3, 2024 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JetBrains: Chats stop loading when opening from history after exporting all chats.
2 participants