fix updater, me dumb
This commit is contained in:
parent
86c36d45b8
commit
0ac4030b5f
@ -29,27 +29,29 @@ public final class FlavorTown {
|
|||||||
public static void updateCheck(@NonNull final Context context) {
|
public static void updateCheck(@NonNull final Context context) {
|
||||||
Resources res = context.getResources();
|
Resources res = context.getResources();
|
||||||
new UpdateChecker(version -> {
|
new UpdateChecker(version -> {
|
||||||
new AlertDialog.Builder(context)
|
if (version != BuildConfig.VERSION_NAME && !BuildConfig.DEBUG) {
|
||||||
.setTitle(res.getString(R.string.update_available, version))
|
new AlertDialog.Builder(context)
|
||||||
.setMessage(R.string.update_notice)
|
.setTitle(res.getString(R.string.update_available, version))
|
||||||
.setNeutralButton(R.string.cancel, null)
|
.setMessage(R.string.update_notice)
|
||||||
.setNegativeButton(R.string.action_github, (dialog, which) -> {
|
.setNeutralButton(R.string.cancel, null)
|
||||||
try {
|
.setNegativeButton(R.string.action_github, (dialog, which) -> {
|
||||||
context.startActivity(new Intent(Intent.ACTION_VIEW).setData(
|
try {
|
||||||
Uri.parse("https://github.com/austinhuang0131/instagrabber/releases/latest")));
|
context.startActivity(new Intent(Intent.ACTION_VIEW).setData(
|
||||||
} catch (final ActivityNotFoundException e) {
|
Uri.parse("https://github.com/austinhuang0131/instagrabber/releases/latest")));
|
||||||
// do nothing
|
} catch (final ActivityNotFoundException e) {
|
||||||
}
|
// do nothing
|
||||||
})
|
}
|
||||||
.setPositiveButton(R.string.action_fdroid, (dialog, which) -> {
|
})
|
||||||
try {
|
.setPositiveButton(R.string.action_fdroid, (dialog, which) -> {
|
||||||
context.startActivity(new Intent(Intent.ACTION_VIEW).setData(
|
try {
|
||||||
Uri.parse("https://f-droid.org/packages/me.austinhuang.instagrabber/")));
|
context.startActivity(new Intent(Intent.ACTION_VIEW).setData(
|
||||||
} catch (final ActivityNotFoundException e) {
|
Uri.parse("https://f-droid.org/packages/me.austinhuang.instagrabber/")));
|
||||||
// do nothing
|
} catch (final ActivityNotFoundException e) {
|
||||||
}
|
// do nothing
|
||||||
})
|
}
|
||||||
.show();
|
})
|
||||||
|
.show();
|
||||||
|
}
|
||||||
}).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
}).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,3 +3,4 @@
|
|||||||
* You can now unsend messages
|
* You can now unsend messages
|
||||||
* Adding favourite button on profile views
|
* Adding favourite button on profile views
|
||||||
* Enforcing a limit of 100 posts per download
|
* Enforcing a limit of 100 posts per download
|
||||||
|
* Fix updater
|
Loading…
Reference in New Issue
Block a user