Skip to content

Commit

Permalink
Merge branch 'master' into appearance_improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
gsantner authored Jul 23, 2024
2 parents cffd907 + be11d3d commit e8e67e9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ public class MainActivity extends MarkorBaseActivity implements GsFileBrowserFra
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
IS_DEBUG_ENABLED |= BuildConfig.IS_TEST_BUILD;

try {
//noinspection ResultOfMethodCallIgnored
_appSettings.getNotebookDirectory().mkdirs();
} catch (Exception ignored) {
}


_cu = new MarkorContextUtils(this);
setContentView(R.layout.main__activity);
_bottomNav = findViewById(R.id.bottom_navigation_bar);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,8 @@ public void onTextChanged(CharSequence s, int start, int before, int count) {

// Initial creation - loop through and set type
final int lastUsedType = appSettings.getNewFileDialogLastUsedType();
typeSpinner.setSelection(GsCollectionUtils.indices(formats, f -> f.format == lastUsedType).get(0));
final List<Integer> indices = GsCollectionUtils.indices(formats, f -> f.format == lastUsedType);
typeSpinner.setSelection(indices.isEmpty() ? 0 : indices.get(0));

titleEdit.requestFocus();

Expand Down

0 comments on commit e8e67e9

Please sign in to comment.