mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-01-01 13:57:10 +01:00
Fix unable to check anonymous subscription.
This commit is contained in:
parent
21e1fcdad9
commit
e5750e35b7
@ -3,10 +3,12 @@ package ml.docilealligator.infinityforreddit.activities;
|
|||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
import androidx.appcompat.widget.Toolbar;
|
import androidx.appcompat.widget.Toolbar;
|
||||||
import androidx.coordinatorlayout.widget.CoordinatorLayout;
|
import androidx.coordinatorlayout.widget.CoordinatorLayout;
|
||||||
|
|
||||||
@ -99,4 +101,13 @@ public class AnonymousSubscriptionsActivity extends BaseActivity {
|
|||||||
coordinatorLayout.setBackgroundColor(mCustomThemeWrapper.getBackgroundColor());
|
coordinatorLayout.setBackgroundColor(mCustomThemeWrapper.getBackgroundColor());
|
||||||
applyAppBarLayoutAndToolbarTheme(appBarLayout, toolbar);
|
applyAppBarLayoutAndToolbarTheme(appBarLayout, toolbar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
||||||
|
if (item.getItemId() == android.R.id.home) {
|
||||||
|
finish();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
@ -16,7 +16,7 @@ public class CheckIsSubscribedToSubreddit {
|
|||||||
if (!redditDataRoomDatabase.accountDao().isAnonymousAccountInserted()) {
|
if (!redditDataRoomDatabase.accountDao().isAnonymousAccountInserted()) {
|
||||||
redditDataRoomDatabase.accountDao().insertAnonymousAccount();
|
redditDataRoomDatabase.accountDao().insertAnonymousAccount();
|
||||||
}
|
}
|
||||||
SubscribedSubredditData subscribedSubredditData = redditDataRoomDatabase.subscribedSubredditDao().getSubscribedSubreddit(subredditName, accountName);
|
SubscribedSubredditData subscribedSubredditData = redditDataRoomDatabase.subscribedSubredditDao().getSubscribedSubreddit(subredditName, accountName == null ? "-" : accountName);
|
||||||
handler.post(() -> {
|
handler.post(() -> {
|
||||||
if (subscribedSubredditData != null) {
|
if (subscribedSubredditData != null) {
|
||||||
checkIsSubscribedToSubredditListener.isSubscribed();
|
checkIsSubscribedToSubredditListener.isSubscribed();
|
||||||
|
Loading…
Reference in New Issue
Block a user