From e542ac51388b9293297bb74b851dcb5ded621a3e Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Thu, 8 Aug 2019 20:05:45 +0800 Subject: Log in other reddit accounts are available. Add an account switcher in the navigation drawer in MainActivity. --- app/src/main/java/Account/AccountDao.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/src/main/java/Account/AccountDao.java') 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> getAccountsExceptCurrentAccountLiveData(String username); } -- cgit v1.2.3