aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/Account/AccountDao.java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/Account/AccountDao.java')
-rw-r--r--app/src/main/java/Account/AccountDao.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/app/src/main/java/Account/AccountDao.java b/app/src/main/java/Account/AccountDao.java
index 8db57683..3052e2b5 100644
--- a/app/src/main/java/Account/AccountDao.java
+++ b/app/src/main/java/Account/AccountDao.java
@@ -22,12 +22,16 @@ public interface AccountDao {
@Query("DELETE FROM accounts")
void deleteAllAccounts();
- @Query("SELECT * FROM accounts WHERE username = :userName COLLATE NOCASE LIMIT 1")
- LiveData<Account> getAccountLiveData(String userName);
+ @Query("SELECT * FROM accounts WHERE username = :username COLLATE NOCASE LIMIT 1")
+ LiveData<Account> getAccountLiveData(String username);
- @Query("SELECT * FROM accounts WHERE username = :userName COLLATE NOCASE LIMIT 1")
- Account getAccountData(String userName);
+ @Query("SELECT * FROM accounts WHERE username = :username COLLATE NOCASE LIMIT 1")
+ Account getAccountData(String username);
@Query("SELECT * FROM accounts WHERE is_current_user = 1 LIMIT 1")
Account getCurrentAccount();
+
+ @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);
}