Package com.aliucord.updater
Class Updater
-
- All Implemented Interfaces:
public class Updater
-
-
Constructor Summary
Constructors Constructor Description Updater()
-
Method Summary
Modifier and Type Method Description static booleanisOutdated(String component, String version, String newVersion)Compares two SemVer-style versions to determine whether a component is outdated static booleanisAliucordOutdated()Determines whether Aliucord is outdated static booleanisDiscordOutdated()Determines whether the Base Discord is outdated static voidupdateAliucord(Context ctx)Replaces the local Aliucord version with the latest from Github static booleanisUpdaterDisabled()Determines whether the updater is disabled static booleanusingDexFromStorage()Determines whether the Aliucord dex is being loaded from storage -
-
Method Detail
-
isOutdated
static boolean isOutdated(String component, String version, String newVersion)
Compares two SemVer-style versions to determine whether a component is outdated
- Parameters:
component- The name of the pluginversion- The local version of the pluginnewVersion- The latest version of the plugin- Returns:
Whether newVersion is newer than version
-
isAliucordOutdated
static boolean isAliucordOutdated()
Determines whether Aliucord is outdated
- Returns:
Whether latest remote Aliucord commit hash is newer than the installed one
-
isDiscordOutdated
static boolean isDiscordOutdated()
Determines whether the Base Discord is outdated
- Returns:
Whether Aliucord's currently supported Discord version is newer than the installed one
-
updateAliucord
static void updateAliucord(Context ctx)
Replaces the local Aliucord version with the latest from Github
- Parameters:
ctx- Context
-
isUpdaterDisabled
static boolean isUpdaterDisabled()
Determines whether the updater is disabled
- Returns:
Whether preference "disableAliucordUpdater" is set to true
-
usingDexFromStorage
static boolean usingDexFromStorage()
Determines whether the Aliucord dex is being loaded from storage
- Returns:
Whether preference ALIUCORD_FROM_STORAGE_KEY is set to true
-
-
-
-