feat: implemented version number control and update dialog for Github flavor

This commit is contained in:
CappielloAntonio 2024-05-31 22:41:01 +02:00
parent c243fa9edc
commit 0a26f0a7b8
19 changed files with 477 additions and 4 deletions

View file

@ -6,6 +6,7 @@ import android.content.SharedPreferences;
import androidx.preference.PreferenceManager;
import com.cappielloantonio.tempo.github.Github;
import com.cappielloantonio.tempo.helper.ThemeHelper;
import com.cappielloantonio.tempo.subsonic.Subsonic;
import com.cappielloantonio.tempo.subsonic.SubsonicPreferences;
@ -15,6 +16,7 @@ public class App extends Application {
private static App instance;
private static Context context;
private static Subsonic subsonic;
private static Github github;
private static SharedPreferences preferences;
@Override
@ -53,6 +55,13 @@ public class App extends Application {
return subsonic;
}
public static Github getGithubClientInstance() {
if (github == null) {
github = new Github();
}
return github;
}
public SharedPreferences getPreferences() {
if (preferences == null) {
preferences = PreferenceManager.getDefaultSharedPreferences(context);