aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/Account/AccountDao.java
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2019-08-08 12:05:45 +0000
committerAlex Ning <chineseperson5@gmail.com>2019-08-08 12:05:45 +0000
commite542ac51388b9293297bb74b851dcb5ded621a3e (patch)
treec6c7073946063ca1a430f85ce0335d51d8d0812b /app/src/main/java/Account/AccountDao.java
parent5b5da3d3fd44d79bc301546b7be94de0a206e020 (diff)
downloadinfinity-for-reddit-e542ac51388b9293297bb74b851dcb5ded621a3e.tar
infinity-for-reddit-e542ac51388b9293297bb74b851dcb5ded621a3e.tar.gz
infinity-for-reddit-e542ac51388b9293297bb74b851dcb5ded621a3e.tar.bz2
infinity-for-reddit-e542ac51388b9293297bb74b851dcb5ded621a3e.tar.lz
infinity-for-reddit-e542ac51388b9293297bb74b851dcb5ded621a3e.tar.xz
infinity-for-reddit-e542ac51388b9293297bb74b851dcb5ded621a3e.tar.zst
infinity-for-reddit-e542ac51388b9293297bb74b851dcb5ded621a3e.zip
Log in other reddit accounts are available. Add an account switcher in the navigation drawer in MainActivity.
Diffstat (limited to 'app/src/main/java/Account/AccountDao.java')
-rw-r--r--app/src/main/java/Account/AccountDao.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/src/main/java/Account/AccountDao.java b/app/src/main/java/Account/AccountDao.java
index 3052e2b5..22eae5d5 100644
--- a/app/src/main/java/Account/AccountDao.java
+++ b/app/src/main/java/Account/AccountDao.java
@@ -34,4 +34,7 @@ public interface AccountDao {
@Query("UPDATE accounts SET profile_image_url = :profileImageUrl, banner_image_url = :bannerImageUrl, " +
"karma = :karma WHERE username = :username")
void updateAccountInfo(String username, String profileImageUrl, String bannerImageUrl, int karma);
+
+ @Query("SELECT * FROM accounts WHERE username != :username")
+ LiveData<List<Account>> getAccountsExceptCurrentAccountLiveData(String username);
}