diff --git a/app/src/main/java/app/fedilab/android/BaseMainActivity.java b/app/src/main/java/app/fedilab/android/BaseMainActivity.java index 025814b1..2c2c531d 100644 --- a/app/src/main/java/app/fedilab/android/BaseMainActivity.java +++ b/app/src/main/java/app/fedilab/android/BaseMainActivity.java @@ -212,6 +212,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt public static String regex_home, regex_local, regex_public; public static BaseAccount currentAccount; public static iconLauncher mLauncher = iconLauncher.BUBBLES; + public static boolean headerMenuOpen; Fragment currentFragment; private AppBarConfiguration mAppBarConfiguration; private ActivityMainBinding binding; @@ -330,7 +331,6 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt } }; private NetworkStateReceiver networkStateReceiver; - public static boolean headerMenuOpen; public static void fetchRecentAccounts(Activity activity, NavHeaderMainBinding headerMainBinding) { SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(activity); @@ -644,8 +644,6 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt popup.show(); } - protected abstract void rateThisApp(); - /** * Open notifications tab when coming from a notification device * @@ -1034,6 +1032,8 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt intent.setFlags(0); } + protected abstract void rateThisApp(); + @Override protected void onNewIntent(Intent intent) { super.onNewIntent(intent); diff --git a/app/src/main/java/app/fedilab/android/mastodon/activities/CheckHomeCacheActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/CheckHomeCacheActivity.java index 8b52a460..b5e3b3e5 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/activities/CheckHomeCacheActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/CheckHomeCacheActivity.java @@ -404,12 +404,21 @@ public class CheckHomeCacheActivity extends BaseBarActivity { }).start(); } + @Override + public boolean onOptionsItemSelected(MenuItem item) { + if (item.getItemId() == android.R.id.home) { + finish(); + return true; + } + return super.onOptionsItemSelected(item); + } + + public enum range { ALL, DAY } - public static class GraphElement { String dateLabel; int count; @@ -424,15 +433,6 @@ public class CheckHomeCacheActivity extends BaseBarActivity { } } - @Override - public boolean onOptionsItemSelected(MenuItem item) { - if (item.getItemId() == android.R.id.home) { - finish(); - return true; - } - return super.onOptionsItemSelected(item); - } - public class CustomMarkerView extends MarkerView { private final TextView tvContent; diff --git a/app/src/main/java/app/fedilab/android/mastodon/activities/InstanceHealthActivity.kt b/app/src/main/java/app/fedilab/android/mastodon/activities/InstanceHealthActivity.kt index 54241f99..a0290ba9 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/activities/InstanceHealthActivity.kt +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/InstanceHealthActivity.kt @@ -79,34 +79,34 @@ class InstanceHealthActivity : DialogFragment() { } binding.name.text = instance.name if (instance.up) { - binding.up.setText(app.fedilab.android.R.string.is_up) + binding.up.setText(R.string.is_up) binding.up.setTextColor( ThemeHelper.getAttColor( requireContext(), - app.fedilab.android.R.attr.colorPrimary + R.attr.colorPrimary ) ) } else { - binding.up.setText(app.fedilab.android.R.string.is_down) + binding.up.setText(R.string.is_down) binding.up.setTextColor( ThemeHelper.getAttColor( requireContext(), - app.fedilab.android.R.attr.colorError + R.attr.colorError ) ) } binding.uptime.text = getString( - app.fedilab.android.R.string.instance_health_uptime, + R.string.instance_health_uptime, instance.uptime * 100 ) if (instance.checked_at != null) binding.checkedAt.text = getString( - app.fedilab.android.R.string.instance_health_checkedat, + R.string.instance_health_checkedat, Helper.dateToString(instance.checked_at) ) binding.values.text = getString( - app.fedilab.android.R.string.instance_health_indication, + R.string.instance_health_indication, instance.version, Helper.withSuffix(instance.active_users.toLong()), Helper.withSuffix(instance.statuses.toLong()) diff --git a/app/src/main/java/app/fedilab/android/mastodon/activities/MastodonListActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/MastodonListActivity.java index 8eb71b19..a5cf710d 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/activities/MastodonListActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/MastodonListActivity.java @@ -373,7 +373,8 @@ public class MastodonListActivity extends BaseBarActivity implements MastodonLis Intent intentBD = new Intent(Helper.BROADCAST_DATA); intentBD.putExtras(b); LocalBroadcastManager.getInstance(MastodonListActivity.this).sendBroadcast(intentBD); - } catch (DBException e) { + } catch ( + DBException e) { e.printStackTrace(); } }).start(); diff --git a/app/src/main/java/app/fedilab/android/mastodon/activities/SearchResultTabActivity.java b/app/src/main/java/app/fedilab/android/mastodon/activities/SearchResultTabActivity.java index cbcb540c..06be2592 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/activities/SearchResultTabActivity.java +++ b/app/src/main/java/app/fedilab/android/mastodon/activities/SearchResultTabActivity.java @@ -67,10 +67,10 @@ import es.dmoral.toasty.Toasty; public class SearchResultTabActivity extends BaseBarActivity { + public Boolean tagEmpty, accountEmpty; private String search; private ActivitySearchResultTabsBinding binding; private TabLayout.Tab initial; - public Boolean tagEmpty, accountEmpty; @Override protected void onCreate(Bundle savedInstanceState) { diff --git a/app/src/main/java/app/fedilab/android/mastodon/client/entities/lemmy/LemmyPost.java b/app/src/main/java/app/fedilab/android/mastodon/client/entities/lemmy/LemmyPost.java index 122e6e3b..ce42efd4 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/client/entities/lemmy/LemmyPost.java +++ b/app/src/main/java/app/fedilab/android/mastodon/client/entities/lemmy/LemmyPost.java @@ -48,16 +48,6 @@ public class LemmyPost implements Serializable { @SerializedName("unread_comments") public int unread_comments; - public static class LemmyPosts { - @SerializedName("posts") - public List posts; - } - - public static class LemmyComments { - @SerializedName("comments") - public List comments; - } - public static Status convert(LemmyPost lemmyPost, String instance) { Status status = new Status(); status.id = lemmyPost.comment == null ? lemmyPost.post.id : lemmyPost.comment.id; @@ -109,6 +99,16 @@ public class LemmyPost implements Serializable { return status; } + public static class LemmyPosts { + @SerializedName("posts") + public List posts; + } + + public static class LemmyComments { + @SerializedName("comments") + public List comments; + } + public static class Post implements Serializable { @SerializedName("id") public String id; diff --git a/app/src/main/java/app/fedilab/android/mastodon/helper/CustomEmoji.java b/app/src/main/java/app/fedilab/android/mastodon/helper/CustomEmoji.java index 9e99a567..707bb309 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/helper/CustomEmoji.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/CustomEmoji.java @@ -30,8 +30,8 @@ import app.fedilab.android.mastodon.client.entities.api.Status; public class CustomEmoji extends ReplacementSpan { - private float scale; private final WeakReference viewWeakReference; + private float scale; private Drawable imageDrawable; private boolean callbackCalled; diff --git a/app/src/main/java/app/fedilab/android/mastodon/helper/ECDHFedilab.java b/app/src/main/java/app/fedilab/android/mastodon/helper/ECDHFedilab.java index b31b931e..bb8a06f9 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/helper/ECDHFedilab.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/ECDHFedilab.java @@ -192,7 +192,9 @@ public class ECDHFedilab { cipher.init(Cipher.DECRYPT_MODE, aesKey, gCMParameterSpec); byte[] decrypted = cipher.doFinal(ciphertext); decryptedStr = new String(decrypted, 2, decrypted.length - 2, StandardCharsets.UTF_8); - } catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidAlgorithmParameterException | InvalidKeyException | BadPaddingException | IllegalBlockSizeException e) { + } catch (NoSuchAlgorithmException | NoSuchPaddingException | + InvalidAlgorithmParameterException | InvalidKeyException | BadPaddingException | + IllegalBlockSizeException e) { e.printStackTrace(); return null; } diff --git a/app/src/main/java/app/fedilab/android/mastodon/helper/Helper.java b/app/src/main/java/app/fedilab/android/mastodon/helper/Helper.java index bd9b1e40..a8933c42 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/helper/Helper.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/Helper.java @@ -467,7 +467,6 @@ public class Helper { } - /*** * Check if the user is connected to Internet * @return boolean diff --git a/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ComposeAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ComposeAdapter.java index 7c96b4c0..541242a0 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ComposeAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/ComposeAdapter.java @@ -133,8 +133,8 @@ import es.dmoral.toasty.Toasty; public class ComposeAdapter extends RecyclerView.Adapter { - private static final int searchDeep = 15; public static final int TYPE_COMPOSE = 1; + private static final int searchDeep = 15; public static boolean autocomplete = false; public static String[] ALPHA = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "!", ",", "?", @@ -985,7 +985,7 @@ public class ComposeAdapter extends RecyclerView.Adapter 0) { + if (contentBuilder.length() > 0) { contentBuilder.append("\n\n"); } diff --git a/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java index 02a15b55..d31ce7ea 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java @@ -190,10 +190,10 @@ public class StatusAdapter extends RecyclerView.Adapter private final List statusList; private final boolean minified; private final Timeline.TimeLineEnum timelineType; - public RemoteInstance.InstanceType type; - public PinnedTimeline pinnedTimeline; private final boolean canBeFederated; private final boolean checkRemotely; + public RemoteInstance.InstanceType type; + public PinnedTimeline pinnedTimeline; public FetchMoreCallBack fetchMoreCallBack; private Context context; private boolean visiblePixelfed; diff --git a/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusDirectMessageAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusDirectMessageAdapter.java index 3f5a5d6e..0868fa18 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusDirectMessageAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusDirectMessageAdapter.java @@ -87,22 +87,15 @@ import app.fedilab.android.mastodon.viewmodel.mastodon.StatusesVM; public class StatusDirectMessageAdapter extends RecyclerView.Adapter { + private static float measuredWidth = -1; private final List statusList; private Context context; private RecyclerView mRecyclerView; - private static float measuredWidth = -1; + public StatusDirectMessageAdapter(List data) { this.statusList = data; } - @NotNull - @Override - public RecyclerView.ViewHolder onCreateViewHolder(@NotNull ViewGroup parent, int viewType) { - context = parent.getContext(); - DrawerStatusChatBinding itemBinding = DrawerStatusChatBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false); - return new StatusChatViewHolder(itemBinding); - } - public static void loadAndAddAttachment(Context context, LayoutMediaBinding layoutMediaBinding, StatusChatViewHolder holder, RecyclerView.Adapter adapter, @@ -214,6 +207,14 @@ public class StatusDirectMessageAdapter extends RecyclerView.Adapter notificationList; private NotificationAdapter notificationAdapter; + private boolean isViewInitialized; + private Notifications initialNotifications; + private String max_id, min_id, min_id_fetch_more, max_id_fetch_more; private final BroadcastReceiver receive_action = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { @@ -108,9 +111,6 @@ public class FragmentMastodonNotification extends Fragment implements Notificati } } }; - private boolean isViewInitialized; - private Notifications initialNotifications; - private String max_id, min_id, min_id_fetch_more, max_id_fetch_more; private LinearLayoutManager mLayoutManager; private NotificationTypeEnum notificationType; private boolean aggregateNotification; diff --git a/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonTimeline.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonTimeline.java index 1ecada15..fcc6049c 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonTimeline.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonTimeline.java @@ -73,9 +73,9 @@ import es.dmoral.toasty.Toasty; public class FragmentMastodonTimeline extends Fragment implements StatusAdapter.FetchMoreCallBack { - private boolean scrollingUp; private static final int PRELOAD_AHEAD_ITEMS = 10; public UpdateCounters update; + private boolean scrollingUp; private FragmentPaginationBinding binding; private TimelinesVM timelinesVM; private AccountsVM accountsVM; @@ -87,10 +87,6 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter. private StatusAdapter statusAdapter; private Timeline.TimeLineEnum timelineType; private List timelineStatuses; - - private boolean retry_for_home_done; - private String lemmy_post_id; - //Handle actions that can be done in other fragments private final BroadcastReceiver receive_action = new BroadcastReceiver() { @Override @@ -180,6 +176,8 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter. } } }; + private boolean retry_for_home_done; + private String lemmy_post_id; private boolean checkRemotely; private String accountIDInRemoteInstance; private boolean isViewInitialized; diff --git a/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentNotificationContainer.java b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentNotificationContainer.java index 437d19e1..fa5736bd 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentNotificationContainer.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentNotificationContainer.java @@ -91,8 +91,6 @@ public class FragmentNotificationContainer extends Fragment { dialogBuilder.setView(dialogView.getRoot()); - - boolean displayAllCategory = sharedpreferences.getBoolean(getString(R.string.SET_DISPLAY_ALL_NOTIFICATIONS_TYPE) + BaseMainActivity.currentUserID + BaseMainActivity.currentInstance, false); dialogView.displayAllCategories.setChecked(displayAllCategory); dialogView.displayAllCategories.setOnCheckedChangeListener((compoundButton, checked) -> { diff --git a/app/src/main/java/app/fedilab/android/peertube/activities/PeertubeActivity.java b/app/src/main/java/app/fedilab/android/peertube/activities/PeertubeActivity.java index f5d6ef4a..076ca830 100644 --- a/app/src/main/java/app/fedilab/android/peertube/activities/PeertubeActivity.java +++ b/app/src/main/java/app/fedilab/android/peertube/activities/PeertubeActivity.java @@ -205,6 +205,8 @@ public class PeertubeActivity extends BasePeertubeActivity implements CommentLis private boolean isShowingTrackSelectionDialog; private Status status; private int flags; + private boolean humanInteraction; + public static void hideKeyboard(Activity activity) { if (activity != null && activity.getWindow() != null) { activity.getWindow().getDecorView(); @@ -215,8 +217,6 @@ public class PeertubeActivity extends BasePeertubeActivity implements CommentLis } } - private boolean humanInteraction; - @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); diff --git a/app/src/main/java/app/fedilab/android/peertube/activities/ShowAccountActivity.java b/app/src/main/java/app/fedilab/android/peertube/activities/ShowAccountActivity.java index 4b7b9e81..ace984dd 100644 --- a/app/src/main/java/app/fedilab/android/peertube/activities/ShowAccountActivity.java +++ b/app/src/main/java/app/fedilab/android/peertube/activities/ShowAccountActivity.java @@ -88,7 +88,6 @@ public class ShowAccountActivity extends BaseBarActivity { } - manageAccount(); AccountsVM viewModel = new ViewModelProvider(ShowAccountActivity.this).get(AccountsVM.class); viewModel.getAccount(accountAcct == null ? account.getUsername() + "@" + account.getHost() : accountAcct).observe(ShowAccountActivity.this, this::manageViewAccounts); diff --git a/app/src/main/java/app/fedilab/android/peertube/client/entities/OauthParams.java b/app/src/main/java/app/fedilab/android/peertube/client/entities/OauthParams.java index f4a57283..a58c2edd 100644 --- a/app/src/main/java/app/fedilab/android/peertube/client/entities/OauthParams.java +++ b/app/src/main/java/app/fedilab/android/peertube/client/entities/OauthParams.java @@ -20,6 +20,8 @@ import com.google.gson.annotations.SerializedName; public class OauthParams { + @SerializedName("x_peertube_otp") + public String x_peertube_otp; @SerializedName("client_id") private String client_id; @SerializedName("client_secret") @@ -44,9 +46,6 @@ public class OauthParams { private String code; @SerializedName("redirect_uri") private String redirect_uri; - @SerializedName("x_peertube_otp") - public String x_peertube_otp; - public String getClient_secret() { return client_secret; diff --git a/app/src/main/java/app/fedilab/android/peertube/drawer/InstanceAdapter.java b/app/src/main/java/app/fedilab/android/peertube/drawer/InstanceAdapter.java index f13e258b..39aa0c98 100644 --- a/app/src/main/java/app/fedilab/android/peertube/drawer/InstanceAdapter.java +++ b/app/src/main/java/app/fedilab/android/peertube/drawer/InstanceAdapter.java @@ -45,10 +45,8 @@ import app.fedilab.android.peertube.helper.RoundedBackgroundSpan; public class InstanceAdapter extends RecyclerView.Adapter { private final List instances; - - private Context context; - public ActionClick actionClick; + private Context context; public InstanceAdapter(List instances) { this.instances = instances; @@ -159,6 +157,10 @@ public class InstanceAdapter extends RecyclerView.Adapter videos, TimelineVM.TimelineType timelineType, boolean sepiaSearch, ChannelData.Channel forChannel, AccountData.PeertubeAccount forAccount) { + this.videos = videos; + this.timelineType = timelineType; + this.sepiaSearch = sepiaSearch || timelineType == SEPIA_SEARCH; + this.forChannel = forChannel; + this.forAccount = forAccount; + } + + public PeertubeAdapter(List videos) { + this.videos = videos; + } + @NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { @@ -107,19 +119,6 @@ public class PeertubeAdapter extends RecyclerView.Adapter videos, TimelineVM.TimelineType timelineType, boolean sepiaSearch, ChannelData.Channel forChannel, AccountData.PeertubeAccount forAccount) { - this.videos = videos; - this.timelineType = timelineType; - this.sepiaSearch = sepiaSearch || timelineType == SEPIA_SEARCH; - this.forChannel = forChannel; - this.forAccount = forAccount; - } - - - public PeertubeAdapter(List videos) { - this.videos = videos; - } - @Override public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, int position) { SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context); @@ -509,13 +508,6 @@ public class PeertubeAdapter extends RecyclerView.Adapter getRelationShip(); } diff --git a/app/src/main/java/app/fedilab/android/peertube/drawer/PlaylistAdapter.java b/app/src/main/java/app/fedilab/android/peertube/drawer/PlaylistAdapter.java index ab4c34d0..fa11124b 100644 --- a/app/src/main/java/app/fedilab/android/peertube/drawer/PlaylistAdapter.java +++ b/app/src/main/java/app/fedilab/android/peertube/drawer/PlaylistAdapter.java @@ -15,8 +15,6 @@ package app.fedilab.android.peertube.drawer; * see . */ - - import android.annotation.SuppressLint; import android.content.Context; import android.view.LayoutInflater; diff --git a/app/src/main/java/app/fedilab/android/peertube/fragment/DisplayNotificationsFragment.java b/app/src/main/java/app/fedilab/android/peertube/fragment/DisplayNotificationsFragment.java index 2e8a4054..a74d8dc1 100644 --- a/app/src/main/java/app/fedilab/android/peertube/fragment/DisplayNotificationsFragment.java +++ b/app/src/main/java/app/fedilab/android/peertube/fragment/DisplayNotificationsFragment.java @@ -60,8 +60,7 @@ public class DisplayNotificationsFragment extends Fragment { public final static int AUTO_INSTANCE_FOLLOWING = 14; public final static int MY_VIDEO_REPPORT_SUCCESS = 15; public final static int ABUSE_NEW_MESSAGE = 16; - - + FragmentRecyclerviewPeertubeBinding binding; private boolean flag_loading; private Context context; private PeertubeNotificationsListAdapter peertubeNotificationsListAdapter; @@ -69,7 +68,6 @@ public class DisplayNotificationsFragment extends Fragment { private List notifications; private boolean firstLoad; private NotificationsVM viewModel; - FragmentRecyclerviewPeertubeBinding binding; @Override public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { diff --git a/app/src/main/java/app/fedilab/android/peertube/fragment/DisplayOverviewFragment.java b/app/src/main/java/app/fedilab/android/peertube/fragment/DisplayOverviewFragment.java index 9f5c4ec0..063a7832 100644 --- a/app/src/main/java/app/fedilab/android/peertube/fragment/DisplayOverviewFragment.java +++ b/app/src/main/java/app/fedilab/android/peertube/fragment/DisplayOverviewFragment.java @@ -171,7 +171,6 @@ public class DisplayOverviewFragment extends Fragment implements PeertubeAdapter } - @Override public void onStop() { super.onStop(); diff --git a/app/src/main/java/app/fedilab/android/peertube/helper/Helper.java b/app/src/main/java/app/fedilab/android/peertube/helper/Helper.java index 47eda966..39a7a839 100644 --- a/app/src/main/java/app/fedilab/android/peertube/helper/Helper.java +++ b/app/src/main/java/app/fedilab/android/peertube/helper/Helper.java @@ -841,11 +841,6 @@ public class Helper { } } - public interface PermissionGranted { - void proceed(); - } - - public static String readFileFromAssets(Context context, String filename) { String json; try { @@ -862,4 +857,9 @@ public class Helper { return json; } + + public interface PermissionGranted { + void proceed(); + } + } diff --git a/app/src/main/java/app/fedilab/android/sqlite/Sqlite.java b/app/src/main/java/app/fedilab/android/sqlite/Sqlite.java index 6dd6b4c3..bb5029b8 100644 --- a/app/src/main/java/app/fedilab/android/sqlite/Sqlite.java +++ b/app/src/main/java/app/fedilab/android/sqlite/Sqlite.java @@ -206,8 +206,8 @@ public class Sqlite extends SQLiteOpenHelper { + COL_USER_ID + " TEXT NOT NULL, " + COL_TYPE + " TEXT NOT NULL, " + COL_MUTED_ACCOUNTS + " TEXT)"; - - + public static SQLiteDatabase db; + private static Sqlite sInstance; private final String CREATE_TABLE_STORED_INSTANCES = "CREATE TABLE " + TABLE_BOOKMARKED_INSTANCES + "(" + COL_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " @@ -215,12 +215,10 @@ public class Sqlite extends SQLiteOpenHelper { + COL_USER_ID + " TEXT NOT NULL, " + COL_ABOUT + " TEXT NOT NULL, " + COL_USER_INSTANCE + " TEXT NOT NULL)"; - private final String CREATE_TABLE_CACHE_TAGS = "CREATE TABLE " + TABLE_CACHE_TAGS + "(" + COL_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " + COL_TAG + " TEXT NOT NULL)"; - private final String CREATE_TABLE_TIMELINE_CACHE_LOGS = "CREATE TABLE " + TABLE_TIMELINE_CACHE_LOGS + "(" + COL_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " @@ -236,10 +234,6 @@ public class Sqlite extends SQLiteOpenHelper { + COL_CREATED_AT + " TEXT NOT NULL)"; - public static SQLiteDatabase db; - private static Sqlite sInstance; - - public Sqlite(Context context, String name, SQLiteDatabase.CursorFactory factory, int version) { super(context, name, factory, version); }