Skip to content

Commit 9f450f5

Browse files
committed
show toast on main thread
Signed-off-by: alperozturk <alper_ozturk@proton.me>
1 parent a256d34 commit 9f450f5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/src/main/java/it/niedermann/owncloud/notes/edit/EditNoteActivity.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@ protected void onCreate(final Bundle savedInstanceState) {
8383
throw new NoCurrentAccountSelectedException(EditNoteActivity.this);
8484
}
8585
} catch (Exception e) {
86-
Toast.makeText(this, R.string.no_account_configured_yet, Toast.LENGTH_LONG).show();
87-
finish();
86+
runOnUiThread(() -> {
87+
Toast.makeText(EditNoteActivity.this, R.string.no_account_configured_yet, Toast.LENGTH_LONG).show();
88+
finish();
89+
});
8890
}
8991
}).start();
9092

0 commit comments

Comments
 (0)