mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 00:05:16 +00:00
Change the way we determine whether current user is signed in or not
This commit is contained in:
@ -194,6 +194,9 @@ class AccountHelper {
|
||||
_currentUserID = preferences.getInt(_USER_ID_PREFERENCE_NAME);
|
||||
}
|
||||
|
||||
/// Check if current user ID is loaded or not
|
||||
static bool get isUserIDLoaded => _currentUserID > 0;
|
||||
|
||||
/// Get the ID of the currently signed in user
|
||||
static int getCurrentUserID() {
|
||||
if (_currentUserID == -1) throw "Current user ID has not been loaded yet!";
|
||||
|
Reference in New Issue
Block a user