diff options
author | MChen321 <76930316+MChen321@users.noreply.github.com> | 2022-06-17 07:51:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-17 07:51:20 +0000 |
commit | 132bd354cdf1471586e0589c41d285bb50dcb020 (patch) | |
tree | 74cbc42933875ee7311032eeb42f97293e1dc432 /app/src/main/java/ml/docilealligator | |
parent | c6a06a10b241ab5591a5eca29699d799aadec8d2 (diff) | |
download | infinity-for-reddit-132bd354cdf1471586e0589c41d285bb50dcb020.tar infinity-for-reddit-132bd354cdf1471586e0589c41d285bb50dcb020.tar.gz infinity-for-reddit-132bd354cdf1471586e0589c41d285bb50dcb020.tar.bz2 infinity-for-reddit-132bd354cdf1471586e0589c41d285bb50dcb020.tar.lz infinity-for-reddit-132bd354cdf1471586e0589c41d285bb50dcb020.tar.xz infinity-for-reddit-132bd354cdf1471586e0589c41d285bb50dcb020.tar.zst infinity-for-reddit-132bd354cdf1471586e0589c41d285bb50dcb020.zip |
Fixed bug that doesnt show user being followed (#707)
* In anonymous mode, fixed bug in CheckIsFollowingUser.java that does not check if accountName is null or not, which prevents room from retrieving SubscribedUserData to check if the user is followed or not.
Also updated Room version to 2.4.2 to be compatible with M1 macbook.
* Simplified SubscribedUserData accountName null check code
Diffstat (limited to 'app/src/main/java/ml/docilealligator')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/asynctasks/CheckIsFollowingUser.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/asynctasks/CheckIsFollowingUser.java b/app/src/main/java/ml/docilealligator/infinityforreddit/asynctasks/CheckIsFollowingUser.java index 2bf3657e..0e174697 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/asynctasks/CheckIsFollowingUser.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/asynctasks/CheckIsFollowingUser.java @@ -12,7 +12,7 @@ public class CheckIsFollowingUser { RedditDataRoomDatabase redditDataRoomDatabase, String username, String accountName, CheckIsFollowingUserListener checkIsFollowingUserListener) { executor.execute(() -> { - SubscribedUserData subscribedUserData = redditDataRoomDatabase.subscribedUserDao().getSubscribedUser(username, accountName); + SubscribedUserData subscribedUserData = redditDataRoomDatabase.subscribedUserDao().getSubscribedUser(username, accountName == null ? "-" : accountName); handler.post(() -> { if (subscribedUserData != null) { checkIsFollowingUserListener.isSubscribed(); |