Skip to content

Commit 7493461

Browse files
committed
Fix locale reset when previewing files
1 parent 41ad9e2 commit 7493461

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

app/lib/embed/embedding.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Embedding {
1515
Embedding({
1616
this.save = true,
1717
this.editable = true,
18-
this.language = '',
18+
this.language = 'user',
1919
this.theme = 'user',
2020
bool internal = false,
2121
this.onExit,

app/test/views/project_page_lifecycle_test.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ void main() {
260260
() => observer.lastDocumentBloc?.state is DocumentLoadSuccess,
261261
'embedded document open',
262262
);
263+
verifyNever(() => settingsCubit.changeLocaleTemporarily(any()));
263264

264265
final editorController = observer.lastDocumentBloc!.editorController;
265266
expect(editorController.transformCubit.state.position, Offset.zero);

metadata/en-US/changelogs/189.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* Fix blur resetting on color change
1818
* Fix polygon collision aabb tests if closed ([#1162](https://github.com/LinwoodDev/Butterfly/pull/1162))
1919
* Fix embed/web loading errors ([#1167](https://github.com/LinwoodDev/Butterfly/issues/1167))
20+
* Fix file previews resetting the language to the system locale
2021
* Upgrade to agb 9
2122

2223
Read more here: https://linwood.dev/butterfly/2.6.0-beta.2

0 commit comments

Comments
 (0)