Skip to content

Commit d42d0b2

Browse files
Fixed crash if tabs count has changed,
Disable temporarily backup and restore because they are undone, Fixed bad english in SetupActivity
1 parent df7981b commit d42d0b2

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

app/src/main/java/com/mrboomdev/awery/ui/activity/MainActivity.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,12 @@ protected void onRestoreInstanceState(@NonNull Bundle savedInstanceState) {
322322

323323
if(binding != null) {
324324
var index = savedInstanceState.getInt("nav_index");
325-
binding.navbarBubble.selectTabAt(index, false);
326-
((NavigationBarView) binding.navbarMaterial).setSelectedItemId(index);
327-
binding.pages.setCurrentItem(index);
325+
326+
if(tabs.size() > index) {
327+
binding.navbarBubble.selectTabAt(index, false);
328+
((NavigationBarView) binding.navbarMaterial).setSelectedItemId(index);
329+
binding.pages.setCurrentItem(index);
330+
}
328331
}
329332
}
330333

app/src/main/java/com/mrboomdev/awery/ui/activity/settings/SettingsActions.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import static com.mrboomdev.awery.app.AweryLifecycle.getAnyContext;
88
import static com.mrboomdev.awery.app.AweryLifecycle.requestPermission;
99
import static com.mrboomdev.awery.app.AweryLifecycle.startActivityForResult;
10+
import static com.mrboomdev.awery.data.Constants.alwaysTrue;
1011
import static com.mrboomdev.awery.util.io.FileUtil.deleteFile;
1112

1213
import android.Manifest;
@@ -67,6 +68,9 @@ public static void run(String actionName) {
6768
}
6869

6970
case AwerySettings.BACKUP -> {
71+
toast("Coming soon");
72+
if(alwaysTrue()) return;
73+
7074
var date = Calendar.getInstance();
7175

7276
var defaultName = date.get(Calendar.YEAR) + "_" +
@@ -119,6 +123,9 @@ public static void run(String actionName) {
119123
}
120124

121125
case AwerySettings.RESTORE -> {
126+
toast("Coming soon");
127+
if(alwaysTrue()) return;
128+
122129
var context = getAnyContext();
123130
var intent = new Intent(Intent.ACTION_GET_CONTENT);
124131
intent.setType(MimeTypes.ANY.toString());

app/src/main/java/com/mrboomdev/awery/ui/activity/setup/SetupActivity.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,15 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
120120

121121
if(template.equals("dantotsu")) {
122122
markwon.setMarkdown(binding.message, """
123-
Sorry, but Dantotsu template do require some extensions to work.
124-
While the beta you can download them in our:
123+
The Dantotsu template requires some extensions to work.
124+
In this beta version, you cannot install extensions directly through the app :(
125+
Currently you can download them on our:
125126
Discord server: https://discord.com/invite/yspVzD4Kbm
126127
Telegram channel: https://t.me/mrboomdev_awery""");
127128
} else {
128129
markwon.setMarkdown(binding.message, """
129-
Sorry, but while the beta you can't download any extensions directly through the app :(.
130-
You can download them in our:
130+
In this beta version, you cannot install extensions directly through the app :(
131+
Currently you can download them on our:
131132
Discord server: https://discord.com/invite/yspVzD4Kbm
132133
Telegram channel: https://t.me/mrboomdev_awery""");
133134
}

0 commit comments

Comments
 (0)