mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-08 07:57:28 +00:00
Skip update check for pre-release builds
This commit is contained in:
parent
1089a39375
commit
86b04e69ee
@ -66,11 +66,13 @@ android {
|
|||||||
dimension "repo"
|
dimension "repo"
|
||||||
// versionNameSuffix "-github" // appended in assemble task
|
// versionNameSuffix "-github" // appended in assemble task
|
||||||
buildConfigField("String", "dsn", SENTRY_DSN)
|
buildConfigField("String", "dsn", SENTRY_DSN)
|
||||||
|
buildConfigField("boolean", "isPre", "false")
|
||||||
}
|
}
|
||||||
|
|
||||||
fdroid {
|
fdroid {
|
||||||
dimension "repo"
|
dimension "repo"
|
||||||
versionNameSuffix "-fdroid"
|
versionNameSuffix "-fdroid"
|
||||||
|
buildConfigField("boolean", "isPre", "false")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,6 +86,7 @@ android {
|
|||||||
|
|
||||||
def suffix = "${versionName}-${flavor}_${builtType}" // eg. 19.1.0-github_debug or release
|
def suffix = "${versionName}-${flavor}_${builtType}" // eg. 19.1.0-github_debug or release
|
||||||
if (builtType.toString() == 'release' && project.hasProperty("pre")) {
|
if (builtType.toString() == 'release' && project.hasProperty("pre")) {
|
||||||
|
buildConfigField("boolean", "isPre", "true")
|
||||||
// append latest commit short hash for pre-release
|
// append latest commit short hash for pre-release
|
||||||
suffix = "${versionName}.${getGitHash()}-${flavor}" // eg. 19.1.0.b123456-github
|
suffix = "${versionName}.${getGitHash()}-${flavor}" // eg. 19.1.0.b123456-github
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import awais.instagrabber.BuildConfig;
|
||||||
import awais.instagrabber.R;
|
import awais.instagrabber.R;
|
||||||
import awais.instagrabber.adapters.SuggestionsAdapter;
|
import awais.instagrabber.adapters.SuggestionsAdapter;
|
||||||
import awais.instagrabber.asyncs.PostFetcher;
|
import awais.instagrabber.asyncs.PostFetcher;
|
||||||
@ -163,8 +164,10 @@ public class MainActivity extends BaseLanguageActivity implements FragmentManage
|
|||||||
setupBottomNavigationBar(true);
|
setupBottomNavigationBar(true);
|
||||||
}
|
}
|
||||||
setupSuggestions();
|
setupSuggestions();
|
||||||
|
if (!BuildConfig.isPre) {
|
||||||
final boolean checkUpdates = settingsHelper.getBoolean(Constants.CHECK_UPDATES);
|
final boolean checkUpdates = settingsHelper.getBoolean(Constants.CHECK_UPDATES);
|
||||||
if (checkUpdates) FlavorTown.updateCheck(this);
|
if (checkUpdates) FlavorTown.updateCheck(this);
|
||||||
|
}
|
||||||
FlavorTown.changelogCheck(this);
|
FlavorTown.changelogCheck(this);
|
||||||
new ViewModelProvider(this).get(AppStateViewModel.class); // Just initiate the App state here
|
new ViewModelProvider(this).get(AppStateViewModel.class); // Just initiate the App state here
|
||||||
final Intent intent = getIntent();
|
final Intent intent = getIntent();
|
||||||
|
@ -193,6 +193,7 @@ public class MorePreferencesFragment extends BasePreferencesFragment {
|
|||||||
BuildConfig.VERSION_NAME + " (" + BuildConfig.VERSION_CODE + ")",
|
BuildConfig.VERSION_NAME + " (" + BuildConfig.VERSION_CODE + ")",
|
||||||
-1,
|
-1,
|
||||||
preference -> {
|
preference -> {
|
||||||
|
if (BuildConfig.isPre) return true;
|
||||||
final AppCompatActivity activity = (AppCompatActivity) getActivity();
|
final AppCompatActivity activity = (AppCompatActivity) getActivity();
|
||||||
if (activity == null) return true;
|
if (activity == null) return true;
|
||||||
FlavorTown.updateCheck(activity, true);
|
FlavorTown.updateCheck(activity, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user