mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 01:53:31 +00:00
Multi server/user implementation
This commit is contained in:
parent
4e269a7446
commit
78a4006ed6
30 changed files with 959 additions and 192 deletions
|
|
@ -15,6 +15,7 @@ public class PreferenceUtil {
|
|||
public static final String PASSWORD = "password";
|
||||
public static final String TOKEN = "token";
|
||||
public static final String SALT = "salt";
|
||||
public static final String SERVER_ID = "server_id";
|
||||
public static final String POSITION = "position";
|
||||
public static final String PROGRESS = "progress";
|
||||
public static final String IMAGE_CACHE_SIZE = "image_cache_size";
|
||||
|
|
@ -89,6 +90,16 @@ public class PreferenceUtil {
|
|||
editor.apply();
|
||||
}
|
||||
|
||||
public String getServerId() {
|
||||
return mPreferences.getString(SERVER_ID, null);
|
||||
}
|
||||
|
||||
public void setServerId(String serverId) {
|
||||
final SharedPreferences.Editor editor = mPreferences.edit();
|
||||
editor.putString(SERVER_ID, serverId);
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
public int getPosition() {
|
||||
return mPreferences.getInt(POSITION, -1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue