summaryrefslogtreecommitdiffstats
path: root/src/ImagePackListModel.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-05-19 23:06:14 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2023-05-20 00:57:51 +0200
commit7fab9a1d73e628ca2371d2215b0198806aa85e94 (patch)
tree4c4e529617cae41a5d3c4ab0574f5cecf0c12f80 /src/ImagePackListModel.cpp
parent4bf725379af5b98e4403769abe608ea17dcd5bdb (diff)
Prevent new packs from overwriting the default pack by accident
Diffstat (limited to 'src/ImagePackListModel.cpp')
-rw-r--r--src/ImagePackListModel.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ImagePackListModel.cpp b/src/ImagePackListModel.cpp
index 368acd8c..4cf807a9 100644
--- a/src/ImagePackListModel.cpp
+++ b/src/ImagePackListModel.cpp
@@ -82,8 +82,10 @@ SingleImagePackModel *
ImagePackListModel::newPack(bool inRoom)
{
ImagePackInfo info{};
- if (inRoom)
+ if (inRoom) {
info.source_room = room_id;
+ info.state_key = SingleImagePackModel::unconflictingStatekey(room_id, "");
+ }
return new SingleImagePackModel(info);
}