mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-01-16 13:13:08 +01:00
Show correct karma in the navigation drawer in MainActivity.
This commit is contained in:
parent
d6d4e230a9
commit
24ae2d85a2
@ -76,9 +76,7 @@ public class FetchMyInfo {
|
||||
if (!jsonResponse.isNull(JSONUtils.SUBREDDIT_KEY)) {
|
||||
bannerImageUrl = Html.fromHtml(jsonResponse.getJSONObject(JSONUtils.SUBREDDIT_KEY).getString(JSONUtils.BANNER_IMG_KEY)).toString();
|
||||
}
|
||||
int linkKarma = jsonResponse.getInt(JSONUtils.LINK_KARMA_KEY);
|
||||
int commentKarma = jsonResponse.getInt(JSONUtils.COMMENT_KARMA_KEY);
|
||||
karma = linkKarma + commentKarma;
|
||||
karma = jsonResponse.getInt(JSONUtils.TOTAL_KARMA_KEY);
|
||||
|
||||
redditDataRoomDatabase.accountDao().updateAccountInfo(name, profileImageUrl, bannerImageUrl, karma);
|
||||
} catch (JSONException e) {
|
||||
|
@ -127,4 +127,5 @@ public class JSONUtils {
|
||||
public static final String RICHTEXT_KEY = "richtext";
|
||||
public static final String SUGGESTED_COMMENT_SORT_KEY = "suggested_comment_sort";
|
||||
public static final String OVER18_KEY = "over18";
|
||||
public static final String TOTAL_KARMA_KEY = "total_karma";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user