mirror of
https://gitea.mayex.net/mayekkuzu/Audinaut.git
synced 2025-02-02 23:43:47 +03:00
Move onCreatePost to onCreate and eliminate functions
This commit is contained in:
parent
8f0a27bfec
commit
7bb5b0f91d
@ -287,14 +287,21 @@ public class SubsonicFragmentActivity extends SubsonicActivity implements Downlo
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}.execute());
|
}.execute());
|
||||||
|
|
||||||
|
if (!infoDialogDisplayed) {
|
||||||
|
infoDialogDisplayed = true;
|
||||||
|
if (Util.getRestUrl(this).contains("demo.subsonic.org")) {
|
||||||
|
Util.info(this, R.string.main_welcome_title, R.string.main_welcome_text);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
try {
|
||||||
protected void onPostCreate(Bundle bundle) {
|
String version = getPackageManager().getPackageInfo(getPackageName(), 0).versionName;
|
||||||
super.onPostCreate(bundle);
|
int ver = Integer.parseInt(version.replace(".", ""));
|
||||||
|
Updater updater = new Updater(ver);
|
||||||
showInfoDialog();
|
updater.checkUpdates(this);
|
||||||
checkUpdates();
|
} catch (Exception ignored) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -557,17 +564,6 @@ public class SubsonicFragmentActivity extends SubsonicActivity implements Downlo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkUpdates() {
|
|
||||||
try {
|
|
||||||
String version = getPackageManager().getPackageInfo(getPackageName(), 0).versionName;
|
|
||||||
int ver = Integer.parseInt(version.replace(".", ""));
|
|
||||||
Updater updater = new Updater(ver);
|
|
||||||
updater.checkUpdates(this);
|
|
||||||
} catch (Exception ignored) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadSession() {
|
private void loadSession() {
|
||||||
PreferenceManager.setDefaultValues(this, R.xml.settings_appearance, false);
|
PreferenceManager.setDefaultValues(this, R.xml.settings_appearance, false);
|
||||||
PreferenceManager.setDefaultValues(this, R.xml.settings_cache, false);
|
PreferenceManager.setDefaultValues(this, R.xml.settings_cache, false);
|
||||||
@ -664,15 +660,6 @@ public class SubsonicFragmentActivity extends SubsonicActivity implements Downlo
|
|||||||
}.execute();
|
}.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showInfoDialog() {
|
|
||||||
if (!infoDialogDisplayed) {
|
|
||||||
infoDialogDisplayed = true;
|
|
||||||
if (Util.getRestUrl(this).contains("demo.subsonic.org")) {
|
|
||||||
Util.info(this, R.string.main_welcome_title, R.string.main_welcome_text);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSongChanged(DownloadFile currentPlaying, int currentPlayingIndex) {
|
public void onSongChanged(DownloadFile currentPlaying, int currentPlayingIndex) {
|
||||||
this.currentPlaying = currentPlaying;
|
this.currentPlaying = currentPlaying;
|
||||||
|
Loading…
Reference in New Issue
Block a user