Skip to content

Commit 5dcc1d9

Browse files
committed
Add more screenshot example files and use different for main view
1 parent fa74248 commit 5dcc1d9

26 files changed

Lines changed: 248953 additions & 25 deletions

File tree

api/lib/src/models/data.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,11 @@ class SimpleNoteDisplay extends NoteDisplay<SimpleNoteDisplay> {
132132
SimpleNoteDisplay.build(super.archive, {super.password}) : super.build();
133133

134134
factory SimpleNoteDisplay.fromData(Uint8List data, {String? password}) {
135-
final archive = ZipDecoder().decodeBytes(data, password: password);
135+
final archive = data.isNotEmpty && data[0] != kArchiveSignature
136+
? convertTextDataToArchive(
137+
json.decode(utf8.decode(data)) as Map<String, dynamic>,
138+
)
139+
: ZipDecoder().decodeBytes(data, password: password);
136140
return SimpleNoteDisplay.build(archive, password: password);
137141
}
138142

0 commit comments

Comments
 (0)