diff options
Diffstat (limited to 'app/src/main/java/ml/docilealligator')
2 files changed, 38 insertions, 2 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java index d1c32368..d5fb3823 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java @@ -106,8 +106,8 @@ import pl.droidsonroids.gif.GifImageView; import retrofit2.Retrofit; public class ViewUserDetailActivity extends BaseActivity implements SortTypeSelectionCallback, - PostLayoutBottomSheetFragment.PostLayoutSelectionCallback, ActivityToolbarInterface, - FABMoreOptionsBottomSheetFragment.FABOptionSelectionCallback, + PostTypeBottomSheetFragment.PostTypeSelectionCallback, PostLayoutBottomSheetFragment.PostLayoutSelectionCallback, + ActivityToolbarInterface, FABMoreOptionsBottomSheetFragment.FABOptionSelectionCallback, RandomBottomSheetFragment.RandomOptionSelectionCallback, MarkPostAsReadInterface { public static final String EXTRA_USER_NAME_KEY = "EUNK"; @@ -1241,6 +1241,28 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele InsertReadPost.insertReadPost(mRedditDataRoomDatabase, mAccountName, post.getId()); } + @Override + public void postTypeSelected(int postType) { + Intent intent; + switch (postType) { + case PostTypeBottomSheetFragment.TYPE_TEXT: + intent = new Intent(this, PostTextActivity.class); + startActivity(intent); + break; + case PostTypeBottomSheetFragment.TYPE_LINK: + intent = new Intent(this, PostLinkActivity.class); + startActivity(intent); + break; + case PostTypeBottomSheetFragment.TYPE_IMAGE: + intent = new Intent(this, PostImageActivity.class); + startActivity(intent); + break; + case PostTypeBottomSheetFragment.TYPE_VIDEO: + intent = new Intent(this, PostVideoActivity.class); + startActivity(intent); + } + } + private static class InsertUserDataAsyncTask extends AsyncTask<Void, Void, Void> { private UserDao userDao; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomThemeSettingsItem.java b/app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomThemeSettingsItem.java index 56ad8718..e61d87c9 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomThemeSettingsItem.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomThemeSettingsItem.java @@ -99,6 +99,16 @@ public class CustomThemeSettingsItem implements Parcelable { context.getString(R.string.theme_item_post_content_color_detail), customTheme.postContentColor)); customThemeSettingsItems.add(new CustomThemeSettingsItem( + context.getString(R.string.theme_item_read_post_title_color), + context.getString(R.string.theme_item_read_post_title_color_detail), + customTheme.readPostTitleColor + )); + customThemeSettingsItems.add(new CustomThemeSettingsItem( + context.getString(R.string.theme_item_read_post_content_color), + context.getString(R.string.theme_item_read_post_content_color_detail), + customTheme.readPostContentColor + )); + customThemeSettingsItems.add(new CustomThemeSettingsItem( context.getString(R.string.theme_item_comment_color), context.getString(R.string.theme_item_comment_color_detail), customTheme.commentColor)); @@ -131,6 +141,10 @@ public class CustomThemeSettingsItem implements Parcelable { context.getString(R.string.theme_item_card_view_background_color_detail), customTheme.cardViewBackgroundColor)); customThemeSettingsItems.add(new CustomThemeSettingsItem( + context.getString(R.string.theme_item_read_post_card_view_background_color), + context.getString(R.string.theme_item_read_post_card_view_background_color_detail), + customTheme.readPostCardViewBackgroundColor)); + customThemeSettingsItems.add(new CustomThemeSettingsItem( context.getString(R.string.theme_item_comment_background_color), context.getString(R.string.theme_item_comment_background_color_detail), customTheme.commentBackgroundColor)); |