diff --git a/app/build.gradle b/app/build.gradle index 545832f3..52284b18 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -54,7 +54,7 @@ tasks.whenTaskAdded { task -> dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'androidx.appcompat:appcompat:1.0.1' + implementation 'androidx.appcompat:appcompat:1.0.2' implementation 'androidx.preference:preference:1.1.0-alpha01' implementation 'androidx.legacy:legacy-preference-v14:1.0.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0' @@ -65,7 +65,7 @@ dependencies { implementation 'com.google.android.material:material:1.0.0' implementation 'com.google.firebase:firebase-core:16.0.5' implementation 'com.google.firebase:firebase-messaging:17.3.4' - implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5' + implementation 'com.crashlytics.sdk.android:crashlytics:2.9.6' implementation 'com.squareup.okhttp3:okhttp:3.11.0' implementation 'com.squareup.picasso:picasso:2.5.2' implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0' diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardActivity.java index e916a339..dfd1d38e 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardActivity.java @@ -197,9 +197,9 @@ public class BoardActivity extends BaseActivity implements BoardAdapter.OnLoadMo tempSubboards.addAll(parsedSubBoards); tempTopics.addAll(parsedTopics); //Removes loading item - if (isLoadingMore) { - if (tempTopics.size() > 0) tempTopics.remove(tempTopics.size() - 1); - } + if (isLoadingMore && tempTopics.size() > 0) + tempTopics.remove(tempTopics.size() - 1); + parsedTitle = boardPage.select("div.nav a.nav").last().text(); //Finds number of pages diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/BoardBookmarksFragment.java b/app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/BoardBookmarksFragment.java index 8a14611c..913d2ce7 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/BoardBookmarksFragment.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/BoardBookmarksFragment.java @@ -26,21 +26,20 @@ import gr.thmmy.mthmmy.model.Bookmark; * create an instance of this fragment. */ public class BoardBookmarksFragment extends Fragment { - protected static final String ARG_SECTION_NUMBER = "SECTION_NUMBER"; - protected static final String ARG_BOARD_BOOKMARKS = "BOARD_BOOKMARKS"; + private static final String ARG_SECTION_NUMBER = "SECTION_NUMBER"; + private static final String ARG_BOARD_BOOKMARKS = "BOARD_BOOKMARKS"; - public static final String INTERACTION_CLICK_BOARD_BOOKMARK = "CLICK_BOARD_BOOKMARK"; - public static final String INTERACTION_TOGGLE_BOARD_NOTIFICATION = "TOGGLE_BOARD_NOTIFICATION"; - public static final String INTERACTION_REMOVE_BOARD_BOOKMARK= "REMOVE_BOARD_BOOKMARK"; + static final String INTERACTION_CLICK_BOARD_BOOKMARK = "CLICK_BOARD_BOOKMARK"; + static final String INTERACTION_TOGGLE_BOARD_NOTIFICATION = "TOGGLE_BOARD_NOTIFICATION"; + static final String INTERACTION_REMOVE_BOARD_BOOKMARK= "REMOVE_BOARD_BOOKMARK"; - ArrayList boardBookmarks = null; + private ArrayList boardBookmarks = null; private static Drawable notificationsEnabledButtonImage; private static Drawable notificationsDisabledButtonImage; // Required empty public constructor - public BoardBookmarksFragment() { - } + public BoardBookmarksFragment() { } /** * Use ONLY this factory method to create a new instance of @@ -130,10 +129,8 @@ public class BoardBookmarksFragment extends Fragment { bookmarksLinearView.addView(row); } } - } else { - + } else bookmarksLinearView.addView(bookmarksListEmptyMessage()); - } return rootView; } @@ -146,9 +143,9 @@ public class BoardBookmarksFragment extends Fragment { emptyBookmarksCategory.setLayoutParams(params); emptyBookmarksCategory.setText(getString(R.string.empty_board_bookmarks)); emptyBookmarksCategory.setTypeface(emptyBookmarksCategory.getTypeface(), Typeface.BOLD); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) emptyBookmarksCategory.setTextColor(this.getContext().getColor(R.color.primary_text)); - } else { + else { //noinspection deprecation emptyBookmarksCategory.setTextColor(this.getContext().getResources().getColor(R.color.primary_text)); } diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/BookmarkActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/BookmarkActivity.java index d6ba695c..20ecfd28 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/BookmarkActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/BookmarkActivity.java @@ -74,7 +74,6 @@ public class BookmarkActivity extends BaseActivity { extras.putString(BUNDLE_TOPIC_TITLE, bookmarkedTopic.getTitle()); intent.putExtras(extras); startActivity(intent); - finish(); break; case TopicBookmarksFragment.INTERACTION_TOGGLE_TOPIC_NOTIFICATION: return toggleNotification(bookmarkedTopic); @@ -96,7 +95,6 @@ public class BookmarkActivity extends BaseActivity { extras.putString(BUNDLE_BOARD_TITLE, bookmarkedBoard.getTitle()); intent.putExtras(extras); startActivity(intent); - finish(); break; case BoardBookmarksFragment.INTERACTION_TOGGLE_BOARD_NOTIFICATION: return toggleNotification(bookmarkedBoard); diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java index f5bcb761..fa56eec1 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java @@ -65,8 +65,8 @@ import gr.thmmy.mthmmy.model.ThmmyFile; import gr.thmmy.mthmmy.model.ThmmyPage; import gr.thmmy.mthmmy.model.TopicItem; import gr.thmmy.mthmmy.utils.CircleTransform; -import gr.thmmy.mthmmy.utils.parsing.ThmmyParser; import gr.thmmy.mthmmy.utils.parsing.ParseHelpers; +import gr.thmmy.mthmmy.utils.parsing.ThmmyParser; import gr.thmmy.mthmmy.viewmodel.TopicViewModel; import timber.log.Timber;