From f173a5d57657ce1b8027d0d54fe30cf6d74e96a7 Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Sun, 4 Dec 2022 09:44:37 +1100 Subject: Remove RPAN. --- app/src/main/AndroidManifest.xml | 6 - .../infinityforreddit/AppComponent.java | 6 - .../infinityforreddit/RPANBroadcast.java | 236 ------------ .../infinityforreddit/RPANComment.java | 15 - .../activities/LinkResolverActivity.java | 5 - .../infinityforreddit/activities/MainActivity.java | 2 - .../infinityforreddit/activities/RPANActivity.java | 426 --------------------- .../RPANCommentStreamRecyclerViewAdapter.java | 89 ----- .../RedditSectionRecyclerViewAdapter.java | 6 +- .../infinityforreddit/apis/Strapi.java | 13 - .../fragments/ViewRPANBroadcastFragment.java | 423 -------------------- app/src/main/res/drawable-night/ic_rpan_24dp.xml | 9 - app/src/main/res/drawable/ic_rpan_24dp.xml | 9 - app/src/main/res/layout/activity_rpanactivity.xml | 23 -- .../exo_rpan_broadcast_playback_control_view.xml | 192 ---------- .../res/layout/fragment_view_rpan_broadcast.xml | 15 - app/src/main/res/layout/item_rpan_comment.xml | 38 -- app/src/main/res/menu/rpan_activity.xml | 15 - app/src/main/res/values-cs/strings.xml | 6 - app/src/main/res/values-de/strings.xml | 6 - app/src/main/res/values-es/strings.xml | 6 - app/src/main/res/values-fr/strings.xml | 6 - app/src/main/res/values-it/strings.xml | 6 - app/src/main/res/values-nl/strings.xml | 4 - app/src/main/res/values-pt-rBR/strings.xml | 6 - app/src/main/res/values-pt/strings.xml | 6 - app/src/main/res/values-ro/strings.xml | 6 - app/src/main/res/values-ru/strings.xml | 6 - app/src/main/res/values-tr-rTR/strings.xml | 6 - app/src/main/res/values-uk/strings.xml | 6 - app/src/main/res/values-vi/strings.xml | 6 - app/src/main/res/values-zh-rCN/strings.xml | 6 - app/src/main/res/values/strings.xml | 7 - 33 files changed, 1 insertion(+), 1616 deletions(-) delete mode 100644 app/src/main/java/ml/docilealligator/infinityforreddit/RPANBroadcast.java delete mode 100644 app/src/main/java/ml/docilealligator/infinityforreddit/RPANComment.java delete mode 100644 app/src/main/java/ml/docilealligator/infinityforreddit/activities/RPANActivity.java delete mode 100644 app/src/main/java/ml/docilealligator/infinityforreddit/adapters/RPANCommentStreamRecyclerViewAdapter.java delete mode 100644 app/src/main/java/ml/docilealligator/infinityforreddit/apis/Strapi.java delete mode 100644 app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRPANBroadcastFragment.java delete mode 100644 app/src/main/res/drawable-night/ic_rpan_24dp.xml delete mode 100644 app/src/main/res/drawable/ic_rpan_24dp.xml delete mode 100644 app/src/main/res/layout/activity_rpanactivity.xml delete mode 100644 app/src/main/res/layout/exo_rpan_broadcast_playback_control_view.xml delete mode 100644 app/src/main/res/layout/fragment_view_rpan_broadcast.xml delete mode 100644 app/src/main/res/layout/item_rpan_comment.xml delete mode 100644 app/src/main/res/menu/rpan_activity.xml (limited to 'app') diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 53394d05..eda0bba2 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -70,12 +70,6 @@ android:parentActivityName=".activities.MainActivity" android:theme="@style/AppTheme.NoActionBar" android:windowSoftInputMode="adjustResize" /> - diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/AppComponent.java b/app/src/main/java/ml/docilealligator/infinityforreddit/AppComponent.java index 8b8f5533..2bf647ec 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/AppComponent.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/AppComponent.java @@ -37,7 +37,6 @@ import ml.docilealligator.infinityforreddit.activities.PostLinkActivity; import ml.docilealligator.infinityforreddit.activities.PostPollActivity; import ml.docilealligator.infinityforreddit.activities.PostTextActivity; import ml.docilealligator.infinityforreddit.activities.PostVideoActivity; -import ml.docilealligator.infinityforreddit.activities.RPANActivity; import ml.docilealligator.infinityforreddit.activities.ReportActivity; import ml.docilealligator.infinityforreddit.activities.RulesActivity; import ml.docilealligator.infinityforreddit.activities.SearchActivity; @@ -81,7 +80,6 @@ import ml.docilealligator.infinityforreddit.fragments.UserListingFragment; import ml.docilealligator.infinityforreddit.fragments.ViewImgurImageFragment; import ml.docilealligator.infinityforreddit.fragments.ViewImgurVideoFragment; import ml.docilealligator.infinityforreddit.fragments.ViewPostDetailFragment; -import ml.docilealligator.infinityforreddit.fragments.ViewRPANBroadcastFragment; import ml.docilealligator.infinityforreddit.fragments.ViewRedditGalleryImageOrGifFragment; import ml.docilealligator.infinityforreddit.fragments.ViewRedditGalleryVideoFragment; import ml.docilealligator.infinityforreddit.services.DownloadMediaService; @@ -281,10 +279,6 @@ public interface AppComponent { void inject(LockScreenActivity lockScreenActivity); - void inject(RPANActivity rpanActivity); - - void inject(ViewRPANBroadcastFragment viewRPANBroadcastFragment); - void inject(PostGalleryActivity postGalleryActivity); void inject(TrendingActivity trendingActivity); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/RPANBroadcast.java b/app/src/main/java/ml/docilealligator/infinityforreddit/RPANBroadcast.java deleted file mode 100644 index d7c936c2..00000000 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/RPANBroadcast.java +++ /dev/null @@ -1,236 +0,0 @@ -package ml.docilealligator.infinityforreddit; - -import android.os.Parcel; -import android.os.Parcelable; - -import ml.docilealligator.infinityforreddit.utils.APIUtils; - -public class RPANBroadcast implements Parcelable { - - public int upvotes; - public int downvotes; - public int uniqueWatchers; - public int continuousWatchers; - public int totalContinuousWatchers; - public boolean chatDisabled; - public double broadcastTime; - public double estimatedRemainingTime; - - public RPANPost rpanPost; - public RPANStream rpanStream; - - public RPANBroadcast(int upvotes, int downvotes, int uniqueWatchers, int continuousWatchers, - int totalContinuousWatchers, boolean chatDisabled, double broadcastTime, - double estimatedRemainingTime, RPANPost rpanPost, RPANStream rpanStream) { - this.upvotes = upvotes; - this.downvotes = downvotes; - this.uniqueWatchers = uniqueWatchers; - this.continuousWatchers = continuousWatchers; - this.totalContinuousWatchers = totalContinuousWatchers; - this.chatDisabled = chatDisabled; - this.broadcastTime = broadcastTime; - this.estimatedRemainingTime = estimatedRemainingTime; - this.rpanPost = rpanPost; - this.rpanStream = rpanStream; - } - - protected RPANBroadcast(Parcel in) { - upvotes = in.readInt(); - downvotes = in.readInt(); - uniqueWatchers = in.readInt(); - continuousWatchers = in.readInt(); - totalContinuousWatchers = in.readInt(); - chatDisabled = in.readByte() != 0; - broadcastTime = in.readDouble(); - estimatedRemainingTime = in.readDouble(); - rpanPost = in.readParcelable(RPANPost.class.getClassLoader()); - rpanStream = in.readParcelable(RPANStream.class.getClassLoader()); - } - - public static final Creator CREATOR = new Creator() { - @Override - public RPANBroadcast createFromParcel(Parcel in) { - return new RPANBroadcast(in); - } - - @Override - public RPANBroadcast[] newArray(int size) { - return new RPANBroadcast[size]; - } - }; - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel(Parcel parcel, int i) { - parcel.writeInt(upvotes); - parcel.writeInt(downvotes); - parcel.writeInt(uniqueWatchers); - parcel.writeInt(continuousWatchers); - parcel.writeInt(totalContinuousWatchers); - parcel.writeByte((byte) (chatDisabled ? 1 : 0)); - parcel.writeDouble(broadcastTime); - parcel.writeDouble(estimatedRemainingTime); - parcel.writeParcelable(rpanPost, i); - parcel.writeParcelable(rpanStream, i); - } - - public static class RPANPost implements Parcelable { - public String fullname; - public String title; - public String subredditName; - public String subredditIconUrl; - public String username; - public int postScore; - public String voteState; - public double upvoteRatio; - public String postPermalink; - public String rpanUrl; - public boolean isNsfw; - public boolean isLocked; - public boolean isArchived; - public boolean isSpoiler; - public String suggestedCommentSort; - public String liveCommentsWebsocketUrl; - - public RPANPost(String fullname, String title, String subredditName, String subredditIconUrl, String username, - int postScore, String voteState, double upvoteRatio, String postPermalink, String rpanUrl, - boolean isNsfw, boolean isLocked, boolean isArchived, boolean isSpoiler, - String suggestedCommentSort, String liveCommentsWebsocketUrl) { - this.fullname = fullname; - this.title = title; - this.subredditName = subredditName; - this.subredditIconUrl = subredditIconUrl; - this.username = username; - this.postScore = postScore; - this.voteState = voteState; - this.upvoteRatio = upvoteRatio; - this.postPermalink = APIUtils.API_BASE_URI + postPermalink; - this.rpanUrl = rpanUrl; - this.isNsfw = isNsfw; - this.isLocked = isLocked; - this.isArchived = isArchived; - this.isSpoiler = isSpoiler; - this.suggestedCommentSort = suggestedCommentSort; - this.liveCommentsWebsocketUrl = liveCommentsWebsocketUrl; - } - - protected RPANPost(Parcel in) { - fullname = in.readString(); - title = in.readString(); - subredditName = in.readString(); - subredditIconUrl = in.readString(); - username = in.readString(); - postScore = in.readInt(); - voteState = in.readString(); - upvoteRatio = in.readDouble(); - postPermalink = in.readString(); - rpanUrl = in.readString(); - isNsfw = in.readByte() != 0; - isLocked = in.readByte() != 0; - isArchived = in.readByte() != 0; - isSpoiler = in.readByte() != 0; - suggestedCommentSort = in.readString(); - liveCommentsWebsocketUrl = in.readString(); - } - - public static final Creator CREATOR = new Creator() { - @Override - public RPANPost createFromParcel(Parcel in) { - return new RPANPost(in); - } - - @Override - public RPANPost[] newArray(int size) { - return new RPANPost[size]; - } - }; - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel(Parcel parcel, int i) { - parcel.writeString(fullname); - parcel.writeString(title); - parcel.writeString(subredditName); - parcel.writeString(subredditIconUrl); - parcel.writeString(username); - parcel.writeInt(postScore); - parcel.writeString(voteState); - parcel.writeDouble(upvoteRatio); - parcel.writeString(postPermalink); - parcel.writeString(rpanUrl); - parcel.writeByte((byte) (isNsfw ? 1 : 0)); - parcel.writeByte((byte) (isLocked ? 1 : 0)); - parcel.writeByte((byte) (isArchived ? 1 : 0)); - parcel.writeByte((byte) (isSpoiler ? 1 : 0)); - parcel.writeString(suggestedCommentSort); - parcel.writeString(liveCommentsWebsocketUrl); - } - } - - public static class RPANStream implements Parcelable { - public String streamId; - public String hlsUrl; - public String thumbnail; - public int width; - public int height; - public long publishAt; - public String state; - - public RPANStream(String streamId, String hlsUrl, String thumbnail, int width, int height, long publishAt, - String state) { - this.streamId = streamId; - this.hlsUrl = hlsUrl; - this.thumbnail = thumbnail; - this.width = width; - this.height = height; - this.publishAt = publishAt; - this.state = state; - } - - protected RPANStream(Parcel in) { - streamId = in.readString(); - hlsUrl = in.readString(); - thumbnail = in.readString(); - width = in.readInt(); - height = in.readInt(); - publishAt = in.readLong(); - state = in.readString(); - } - - public static final Creator CREATOR = new Creator() { - @Override - public RPANStream createFromParcel(Parcel in) { - return new RPANStream(in); - } - - @Override - public RPANStream[] newArray(int size) { - return new RPANStream[size]; - } - }; - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel(Parcel parcel, int i) { - parcel.writeString(streamId); - parcel.writeString(hlsUrl); - parcel.writeString(thumbnail); - parcel.writeInt(width); - parcel.writeInt(height); - parcel.writeLong(publishAt); - parcel.writeString(state); - } - } -} diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/RPANComment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/RPANComment.java deleted file mode 100644 index 077031bf..00000000 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/RPANComment.java +++ /dev/null @@ -1,15 +0,0 @@ -package ml.docilealligator.infinityforreddit; - -public class RPANComment { - public String author; - public String authorIconImage; - public String content; - public long createdUTC; - - public RPANComment(String author, String authorIconImage, String content, long createdUTC) { - this.author = author; - this.authorIconImage = authorIconImage; - this.content = content; - this.createdUTC = createdUTC; - } -} diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java index 5bba98bc..9fba9cdf 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java @@ -49,7 +49,6 @@ public class LinkResolverActivity extends AppCompatActivity { private static final String IMGUR_GALLERY_PATTERN = "/gallery/\\w+/?"; private static final String IMGUR_ALBUM_PATTERN = "/(album|a)/\\w+/?"; private static final String IMGUR_IMAGE_PATTERN = "/\\w+/?"; - private static final String RPAN_BROADCAST_PATTERN = "/rpan/r/[\\w-]+/\\w+/?\\w+/?"; private static final String WIKI_PATTERN = "/[rR]/[\\w-]+/(wiki|w)(?:/[\\w-]+)*"; private static final String GOOGLE_AMP_PATTERN = "/amp/s/amp.reddit.com/.*"; private static final String STREAMABLE_PATTERN = "/\\w+/?"; @@ -248,10 +247,6 @@ public class LinkResolverActivity extends AppCompatActivity { intent.putExtra(ViewSubredditDetailActivity.EXTRA_MESSAGE_FULLNAME, messageFullname); intent.putExtra(ViewSubredditDetailActivity.EXTRA_NEW_ACCOUNT_NAME, newAccountName); startActivity(intent); - } else if (path.matches(RPAN_BROADCAST_PATTERN)) { - Intent intent = new Intent(this, RPANActivity.class); - intent.putExtra(RPANActivity.EXTRA_RPAN_BROADCAST_FULLNAME_OR_ID, path.substring(path.lastIndexOf('/') + 1)); - startActivity(intent); } else if (authority.equals("redd.it") && path.matches(REDD_IT_POST_PATTERN)) { Intent intent = new Intent(this, ViewPostDetailActivity.class); intent.putExtra(ViewPostDetailActivity.EXTRA_POST_ID, path.substring(1)); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/MainActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/MainActivity.java index 43d41e8a..bbc23811 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/MainActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/MainActivity.java @@ -779,8 +779,6 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb intent.putExtra(SubscribedThingListingActivity.EXTRA_SHOW_MULTIREDDITS, true); } else if (stringId == R.string.history) { intent = new Intent(MainActivity.this, HistoryActivity.class); - } else if (stringId == R.string.rpan) { - intent = new Intent(MainActivity.this, RPANActivity.class); } else if (stringId == R.string.trending) { intent = new Intent(MainActivity.this, TrendingActivity.class); } else if (stringId == R.string.upvoted) { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/RPANActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/RPANActivity.java deleted file mode 100644 index ecc459a4..00000000 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/RPANActivity.java +++ /dev/null @@ -1,426 +0,0 @@ -package ml.docilealligator.infinityforreddit.activities; - -import android.content.ActivityNotFoundException; -import android.content.Intent; -import android.content.SharedPreferences; -import android.graphics.Color; -import android.graphics.Typeface; -import android.graphics.drawable.ColorDrawable; -import android.graphics.drawable.Drawable; -import android.media.AudioManager; -import android.os.Bundle; -import android.os.Handler; -import android.text.Html; -import android.view.Menu; -import android.view.MenuItem; -import android.view.View; -import android.widget.ProgressBar; -import android.widget.Toast; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.appcompat.app.ActionBar; -import androidx.appcompat.app.AppCompatActivity; -import androidx.coordinatorlayout.widget.CoordinatorLayout; -import androidx.fragment.app.Fragment; -import androidx.fragment.app.FragmentActivity; -import androidx.recyclerview.widget.RecyclerView; -import androidx.viewpager2.adapter.FragmentStateAdapter; -import androidx.viewpager2.widget.ViewPager2; - -import com.evernote.android.state.State; -import com.google.android.material.snackbar.Snackbar; -import com.livefront.bridge.Bridge; - -import org.greenrobot.eventbus.EventBus; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -import java.io.IOException; -import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.concurrent.Executor; - -import javax.inject.Inject; -import javax.inject.Named; - -import butterknife.BindView; -import butterknife.ButterKnife; -import ml.docilealligator.infinityforreddit.CustomFontReceiver; -import ml.docilealligator.infinityforreddit.Infinity; -import ml.docilealligator.infinityforreddit.R; -import ml.docilealligator.infinityforreddit.RPANBroadcast; -import ml.docilealligator.infinityforreddit.apis.Strapi; -import ml.docilealligator.infinityforreddit.customtheme.CustomThemeWrapper; -import ml.docilealligator.infinityforreddit.font.ContentFontFamily; -import ml.docilealligator.infinityforreddit.font.ContentFontStyle; -import ml.docilealligator.infinityforreddit.font.FontFamily; -import ml.docilealligator.infinityforreddit.font.FontStyle; -import ml.docilealligator.infinityforreddit.font.TitleFontFamily; -import ml.docilealligator.infinityforreddit.font.TitleFontStyle; -import ml.docilealligator.infinityforreddit.fragments.ViewRPANBroadcastFragment; -import ml.docilealligator.infinityforreddit.utils.JSONUtils; -import ml.docilealligator.infinityforreddit.utils.SharedPreferencesUtils; -import ml.docilealligator.infinityforreddit.utils.Utils; -import okhttp3.ResponseBody; -import retrofit2.Call; -import retrofit2.Callback; -import retrofit2.Response; -import retrofit2.Retrofit; - -public class RPANActivity extends AppCompatActivity implements CustomFontReceiver { - - public static final String EXTRA_RPAN_BROADCAST_FULLNAME_OR_ID = "ERBFOI"; - - @BindView(R.id.coordinator_layout_rpan_activity) - CoordinatorLayout coordinatorLayout; - @BindView(R.id.view_pager_2_rpan_activity) - ViewPager2 viewPager2; - @BindView(R.id.progress_bar_rpan_activity) - ProgressBar progressBar; - @Inject - @Named("strapi") - Retrofit strapiRetrofit; - @Inject - @Named("default") - SharedPreferences mSharedPreferences; - @Inject - CustomThemeWrapper mCustomThemeWrapper; - @Inject - Executor mExecutor; - @State - ArrayList rpanBroadcasts; - @State - String nextCursor; - public Typeface typeface; - private SectionsPagerAdapter sectionsPagerAdapter; - - @Override - protected void onCreate(Bundle savedInstanceState) { - ((Infinity) getApplication()).getAppComponent().inject(this); - - super.onCreate(savedInstanceState); - - getTheme().applyStyle(R.style.Theme_Normal, true); - - getTheme().applyStyle(FontStyle.valueOf(mSharedPreferences - .getString(SharedPreferencesUtils.FONT_SIZE_KEY, FontStyle.Normal.name())).getResId(), true); - - getTheme().applyStyle(TitleFontStyle.valueOf(mSharedPreferences - .getString(SharedPreferencesUtils.TITLE_FONT_SIZE_KEY, TitleFontStyle.Normal.name())).getResId(), true); - - getTheme().applyStyle(ContentFontStyle.valueOf(mSharedPreferences - .getString(SharedPreferencesUtils.CONTENT_FONT_SIZE_KEY, ContentFontStyle.Normal.name())).getResId(), true); - - getTheme().applyStyle(FontFamily.valueOf(mSharedPreferences - .getString(SharedPreferencesUtils.FONT_FAMILY_KEY, FontFamily.Default.name())).getResId(), true); - - getTheme().applyStyle(TitleFontFamily.valueOf(mSharedPreferences - .getString(SharedPreferencesUtils.TITLE_FONT_FAMILY_KEY, TitleFontFamily.Default.name())).getResId(), true); - - getTheme().applyStyle(ContentFontFamily.valueOf(mSharedPreferences - .getString(SharedPreferencesUtils.CONTENT_FONT_FAMILY_KEY, ContentFontFamily.Default.name())).getResId(), true); - - setContentView(R.layout.activity_rpanactivity); - - setVolumeControlStream(AudioManager.STREAM_MUSIC); - - Bridge.restoreInstanceState(this, savedInstanceState); - - ButterKnife.bind(this); - - ActionBar actionBar = getSupportActionBar(); - Drawable upArrow = getResources().getDrawable(R.drawable.ic_arrow_back_white_24dp); - actionBar.setHomeAsUpIndicator(upArrow); - actionBar.setBackgroundDrawable(new ColorDrawable(Color.parseColor("#00000000"))); - actionBar.setTitle(Utils.getTabTextWithCustomFont(typeface, Html.fromHtml("" + getString(R.string.rpan_activity_label) + ""))); - - if (rpanBroadcasts == null) { - loadRPANVideos(); - } else { - initializeViewPager(); - } - } - - private void loadRPANVideos() { - String rpanBroadcastFullNameOrId = getIntent().getStringExtra(EXTRA_RPAN_BROADCAST_FULLNAME_OR_ID); - if (rpanBroadcastFullNameOrId == null) { - strapiRetrofit.create(Strapi.class).getAllBroadcasts().enqueue(new Callback() { - @Override - public void onResponse(@NonNull Call call, @NonNull Response response) { - progressBar.setVisibility(View.GONE); - if (response.isSuccessful()) { - parseRPANBroadcasts(response.body()); - } else { - try { - ResponseBody responseBody = response.errorBody(); - if (responseBody != null) { - JSONObject errorObject = new JSONObject(responseBody.string()); - String errorMessage = errorObject.getString(JSONUtils.DATA_KEY); - if (!errorMessage.isEmpty() && !errorMessage.equals("null")) { - Snackbar.make(coordinatorLayout, errorMessage, Snackbar.LENGTH_LONG).show(); - } else { - Toast.makeText(RPANActivity.this, - R.string.load_rpan_broadcasts_failed, Toast.LENGTH_SHORT).show(); - } - } else { - Toast.makeText(RPANActivity.this, - R.string.load_rpan_broadcasts_failed, Toast.LENGTH_SHORT).show(); - } - } catch (IOException | JSONException e) { - e.printStackTrace(); - Toast.makeText(RPANActivity.this, - R.string.load_rpan_broadcasts_failed, Toast.LENGTH_SHORT).show(); - } - } - } - - @Override - public void onFailure(@NonNull Call call, @NonNull Throwable t) { - progressBar.setVisibility(View.GONE); - Toast.makeText(RPANActivity.this, - R.string.load_rpan_broadcasts_failed, Toast.LENGTH_SHORT).show(); - } - }); - } else { - strapiRetrofit.create(Strapi.class).getRPANBroadcast(rpanBroadcastFullNameOrId).enqueue(new Callback() { - @Override - public void onResponse(@NonNull Call call, @NonNull Response response) { - progressBar.setVisibility(View.GONE); - if (response.isSuccessful()) { - Handler handler = new Handler(); - mExecutor.execute(() -> { - try { - rpanBroadcasts = new ArrayList<>(); - rpanBroadcasts.add(parseSingleRPANBroadcast(new JSONObject(response.body()).getJSONObject(JSONUtils.DATA_KEY))); - handler.post(() -> initializeViewPager()); - } catch (JSONException e) { - e.printStackTrace(); - handler.post(() -> Toast.makeText(RPANActivity.this, - R.string.parse_rpan_broadcasts_failed, Toast.LENGTH_SHORT).show()); - } - }); - } else { - try { - ResponseBody responseBody = response.errorBody(); - if (responseBody != null) { - JSONObject errorObject = new JSONObject(responseBody.string()); - String errorMessage = errorObject.getString(JSONUtils.DATA_KEY); - if (!errorMessage.isEmpty() && !errorMessage.equals("null")) { - Snackbar.make(coordinatorLayout, errorMessage, Snackbar.LENGTH_LONG).show(); - } else { - Toast.makeText(RPANActivity.this, - R.string.load_rpan_broadcasts_failed, Toast.LENGTH_SHORT).show(); - } - } else { - Toast.makeText(RPANActivity.this, - R.string.load_rpan_broadcasts_failed, Toast.LENGTH_SHORT).show(); - } - } catch (IOException | JSONException e) { - e.printStackTrace(); - Toast.makeText(RPANActivity.this, - R.string.load_rpan_broadcasts_failed, Toast.LENGTH_SHORT).show(); - } - } - } - - @Override - public void onFailure(@NonNull Call call, @NonNull Throwable t) { - progressBar.setVisibility(View.GONE); - Toast.makeText(RPANActivity.this, - R.string.load_rpan_broadcasts_failed, Toast.LENGTH_SHORT).show(); - } - }); - } - } - - private void parseRPANBroadcasts(String response) { - Handler handler = new Handler(); - mExecutor.execute(() -> { - try { - ArrayList rpanBroadcasts = new ArrayList<>(); - JSONObject responseObject = new JSONObject(response); - String nextCursor = responseObject.getString(JSONUtils.NEXT_CURSOR_KEY); - - JSONArray dataArray = responseObject.getJSONArray(JSONUtils.DATA_KEY); - for (int i = 0; i < dataArray.length(); i++) { - try { - JSONObject singleData = dataArray.getJSONObject(i); - rpanBroadcasts.add(parseSingleRPANBroadcast(singleData)); - } catch (JSONException e) { - e.printStackTrace(); - } - } - - handler.post(() -> { - RPANActivity.this.rpanBroadcasts = rpanBroadcasts; - RPANActivity.this.nextCursor = nextCursor; - - initializeViewPager(); - }); - } catch (JSONException e) { - e.printStackTrace(); - handler.post(() -> Toast.makeText(RPANActivity.this, - R.string.parse_rpan_broadcasts_failed, Toast.LENGTH_SHORT).show()); - } - }); - } - - private RPANBroadcast parseSingleRPANBroadcast(JSONObject singleData) throws JSONException { - JSONObject rpanPostObject = singleData.getJSONObject(JSONUtils.POST_KEY); - RPANBroadcast.RPANPost rpanPost = new RPANBroadcast.RPANPost( - rpanPostObject.getString(JSONUtils.ID_KEY), - rpanPostObject.getString(JSONUtils.TITLE_KEY), - rpanPostObject.getJSONObject(JSONUtils.SUBREDDIT_KEY).getString(JSONUtils.NAME_KEY), - rpanPostObject.getJSONObject(JSONUtils.SUBREDDIT_KEY).getJSONObject(JSONUtils.STYLES_KEY).getString(JSONUtils.ICON_KEY), - rpanPostObject.getJSONObject(JSONUtils.AUTHOR_INFO_KEY).getString(JSONUtils.NAME_KEY), - rpanPostObject.getInt(JSONUtils.SCORE_KEY), - rpanPostObject.getString(JSONUtils.VOTE_STATE_KEY), - rpanPostObject.getDouble(JSONUtils.UPVOTE_RATIO_CAMEL_CASE_KEY), - rpanPostObject.getString(JSONUtils.PERMALINK_KEY), - rpanPostObject.getJSONObject(JSONUtils.OUTBOUND_LINK_KEY).getString(JSONUtils.URL_KEY), - rpanPostObject.getBoolean(JSONUtils.IS_NSFW_KEY), - rpanPostObject.getBoolean(JSONUtils.IS_LOCKED_KEY), - rpanPostObject.getBoolean(JSONUtils.IS_ARCHIVED_KEY), - rpanPostObject.getBoolean(JSONUtils.IS_SPOILER), - rpanPostObject.getString(JSONUtils.SUGGESTED_COMMENT_SORT_CAMEL_CASE_KEY), - rpanPostObject.getString(JSONUtils.LIVE_COMMENTS_WEBSOCKET_KEY) - ); - - JSONObject rpanStreamObject = singleData.getJSONObject(JSONUtils.STREAM_KEY); - RPANBroadcast.RPANStream rpanStream = new RPANBroadcast.RPANStream( - rpanStreamObject.getString(JSONUtils.STREAM_ID_KEY), - rpanStreamObject.getString(JSONUtils.HLS_URL_KEY), - rpanStreamObject.getString(JSONUtils.THUMBNAIL_KEY), - rpanStreamObject.getInt(JSONUtils.WIDTH_KEY), - rpanStreamObject.getInt(JSONUtils.HEIGHT_KEY), - rpanStreamObject.getLong(JSONUtils.PUBLISH_AT_KEY), - rpanStreamObject.getString(JSONUtils.STATE_KEY) - ); - - return new RPANBroadcast( - singleData.getInt(JSONUtils.UPVOTES_KEY), - singleData.getInt(JSONUtils.DOWNVOTES_KEY), - singleData.getInt(JSONUtils.UNIQUE_WATCHERS_KEY), - singleData.getInt(JSONUtils.CONTINUOUS_WATCHERS_KEY), - singleData.getInt(JSONUtils.TOTAL_CONTINUOUS_WATCHERS_KEY), - singleData.getBoolean(JSONUtils.CHAT_DISABLED_KEY), - singleData.getDouble(JSONUtils.BROADCAST_TIME_KEY), - singleData.getDouble(JSONUtils.ESTIMATED_REMAINING_TIME_KEY), - rpanPost, - rpanStream - ); - } - - private void initializeViewPager() { - sectionsPagerAdapter = new SectionsPagerAdapter(this); - viewPager2.setAdapter(sectionsPagerAdapter); - viewPager2.setOffscreenPageLimit(3); - fixViewPager2Sensitivity(viewPager2); - } - - private void fixViewPager2Sensitivity(ViewPager2 viewPager2) { - try { - Field recyclerViewField = ViewPager2.class.getDeclaredField("mRecyclerView"); - recyclerViewField.setAccessible(true); - - RecyclerView recyclerView = (RecyclerView) recyclerViewField.get(viewPager2); - - Field touchSlopField = RecyclerView.class.getDeclaredField("mTouchSlop"); - touchSlopField.setAccessible(true); - - Object touchSlopBox = touchSlopField.get(recyclerView); - if (touchSlopBox != null) { - int touchSlop = (int) touchSlopBox; - touchSlopField.set(recyclerView, touchSlop * 4); - } - } catch (NoSuchFieldException | IllegalAccessException ignore) {} - } - - @Override - public boolean onCreateOptionsMenu(Menu menu) { - getMenuInflater().inflate(R.menu.rpan_activity, menu); - for (int i = 0; i < menu.size(); i++) { - Utils.setTitleWithCustomFontToMenuItem(typeface, menu.getItem(i), null); - } - return true; - } - - @Override - public boolean onOptionsItemSelected(@NonNull MenuItem item) { - if (item.getItemId() == android.R.id.home) { - finish(); - return true; - } else if (item.getItemId() == R.id.action_share_rpan_link_rpan_activity) { - if (rpanBroadcasts != null) { - int position = viewPager2.getCurrentItem(); - if (position >= 0 && position < rpanBroadcasts.size()) { - shareLink(rpanBroadcasts.get(position).rpanPost.rpanUrl); - return true; - } - } - } else if (item.getItemId() == R.id.action_share_post_link_rpan_activity) { - if (rpanBroadcasts != null) { - int position = viewPager2.getCurrentItem(); - if (position >= 0 && position < rpanBroadcasts.size()) { - shareLink(rpanBroadcasts.get(position).rpanPost.postPermalink); - return true; - } - } - } - return false; - } - - @Override - protected void onDestroy() { - super.onDestroy(); - EventBus.getDefault().unregister(this); - } - - private void shareLink(String link) { - try { - Intent intent = new Intent(Intent.ACTION_SEND); - intent.setType("text/plain"); - intent.putExtra(Intent.EXTRA_TEXT, link); - startActivity(Intent.createChooser(intent, getString(R.string.share))); - } catch (ActivityNotFoundException e) { - Toast.makeText(this, R.string.no_activity_found_for_share, Toast.LENGTH_SHORT).show(); - } - } - - @Override - public void setCustomFont(Typeface typeface, Typeface titleTypeface, Typeface contentTypeface) { - this.typeface = typeface; - } - - private class SectionsPagerAdapter extends FragmentStateAdapter { - - public SectionsPagerAdapter(FragmentActivity fa) { - super(fa); - } - - @NonNull - @Override - public Fragment createFragment(int position) { - ViewRPANBroadcastFragment fragment = new ViewRPANBroadcastFragment(); - Bundle bundle = new Bundle(); - bundle.putParcelable(ViewRPANBroadcastFragment.EXTRA_RPAN_BROADCAST, rpanBroadcasts.get(position)); - fragment.setArguments(bundle); - return fragment; - } - - @Nullable - private Fragment getCurrentFragment() { - if (viewPager2 == null || getSupportFragmentManager() == null) { - return null; - } - return getSupportFragmentManager().findFragmentByTag("f" + viewPager2.getCurrentItem()); - } - - @Override - public int getItemCount() { - return rpanBroadcasts == null ? 0 : rpanBroadcasts.size(); - } - } -} \ No newline at end of file diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/RPANCommentStreamRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/RPANCommentStreamRecyclerViewAdapter.java deleted file mode 100644 index d3c029af..00000000 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/RPANCommentStreamRecyclerViewAdapter.java +++ /dev/null @@ -1,89 +0,0 @@ -package ml.docilealligator.infinityforreddit.adapters; - -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.ImageView; -import android.widget.TextView; - -import androidx.annotation.NonNull; -import androidx.recyclerview.widget.RecyclerView; - -import com.bumptech.glide.Glide; -import com.bumptech.glide.RequestManager; -import com.bumptech.glide.request.RequestOptions; - -import java.util.ArrayList; - -import jp.wasabeef.glide.transformations.RoundedCornersTransformation; -import ml.docilealligator.infinityforreddit.R; -import ml.docilealligator.infinityforreddit.RPANComment; -import ml.docilealligator.infinityforreddit.activities.RPANActivity; - -public class RPANCommentStreamRecyclerViewAdapter extends RecyclerView.Adapter { - private RPANActivity activity; - private RequestManager glide; - private ArrayList rpanComments; - - public RPANCommentStreamRecyclerViewAdapter(RPANActivity activity) { - this.activity = activity; - glide = Glide.with(activity); - rpanComments = new ArrayList<>(); - } - - @NonNull - @Override - public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { - return new RPANCommentViewHolder(LayoutInflater.from(parent.getContext()).inflate( - R.layout.item_rpan_comment, parent, false)); - } - - @Override - public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { - if (holder instanceof RPANCommentViewHolder) { - ((RPANCommentViewHolder) holder).authorTextView.setText(rpanComments.get(position).author); - ((RPANCommentViewHolder) holder).contentTextView.setText(rpanComments.get(position).content); - glide.load(rpanComments.get(position).authorIconImage) - .apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0))) - .error(glide.load(R.drawable.subreddit_default_icon) - .apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0)))) - .into(((RPANCommentViewHolder) holder).iconImageView); - } - } - - @Override - public int getItemCount() { - return rpanComments == null ? 0 : rpanComments.size(); - } - - @Override - public void onViewRecycled(@NonNull RecyclerView.ViewHolder holder) { - super.onViewRecycled(holder); - if (holder instanceof RPANCommentViewHolder) { - glide.clear(((RPANCommentViewHolder) holder).iconImageView); - } - } - - public void addRPANComment(RPANComment rpanComment) { - rpanComments.add(rpanComment); - notifyItemInserted(rpanComments.size() - 1); - } - - class RPANCommentViewHolder extends RecyclerView.ViewHolder { - ImageView iconImageView; - TextView authorTextView; - TextView contentTextView; - - public RPANCommentViewHolder(@NonNull View itemView) { - super(itemView); - iconImageView = itemView.findViewById(R.id.icon_image_view_item_rpan_comment); - authorTextView = itemView.findViewById(R.id.author_text_view_item_rpan_comment); - contentTextView = itemView.findViewById(R.id.content_text_view_item_rpan_comment); - - if (activity.typeface != null) { - authorTextView.setTypeface(activity.typeface); - contentTextView.setTypeface(activity.typeface); - } - } - } -} diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/RedditSectionRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/RedditSectionRecyclerViewAdapter.java index ab6ed539..487e9d33 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/RedditSectionRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/RedditSectionRecyclerViewAdapter.java @@ -22,7 +22,7 @@ public class RedditSectionRecyclerViewAdapter extends RecyclerView.Adapter getAllBroadcasts(); - - @GET("/videos/{rpan_id_or_fullname}") - Call getRPANBroadcast(@Path("rpan_id_or_fullname") String rpanIdOrFullname); -} diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRPANBroadcastFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRPANBroadcastFragment.java deleted file mode 100644 index b00f6d4c..00000000 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRPANBroadcastFragment.java +++ /dev/null @@ -1,423 +0,0 @@ -package ml.docilealligator.infinityforreddit.fragments; - -import android.app.AlertDialog; -import android.app.Dialog; -import android.content.Context; -import android.content.SharedPreferences; -import android.content.res.Configuration; -import android.os.Bundle; -import android.os.Handler; -import android.view.LayoutInflater; -import android.view.MotionEvent; -import android.view.View; -import android.view.ViewGroup; -import android.widget.ImageButton; -import android.widget.ImageView; -import android.widget.TextView; - -import androidx.annotation.NonNull; -import androidx.constraintlayout.widget.ConstraintLayout; -import androidx.fragment.app.Fragment; -import androidx.recyclerview.widget.RecyclerView; - -import com.bumptech.glide.Glide; -import com.bumptech.glide.request.RequestOptions; -import com.google.android.exoplayer2.ExoPlaybackException; -import com.google.android.exoplayer2.ExoPlayer; -import com.google.android.exoplayer2.MediaItem; -import com.google.android.exoplayer2.Player; -import com.google.android.exoplayer2.Tracks; -import com.google.android.exoplayer2.source.BehindLiveWindowException; -import com.google.android.exoplayer2.source.hls.HlsMediaSource; -import com.google.android.exoplayer2.trackselection.DefaultTrackSelector; -import com.google.android.exoplayer2.ui.PlayerView; -import com.google.android.exoplayer2.ui.TrackSelectionDialogBuilder; -import com.google.android.exoplayer2.upstream.DataSource; -import com.google.android.exoplayer2.upstream.DefaultHttpDataSource; -import com.google.android.exoplayer2.upstream.cache.CacheDataSource; -import com.google.android.exoplayer2.upstream.cache.SimpleCache; -import com.google.common.collect.ImmutableList; - -import org.json.JSONException; -import org.json.JSONObject; - -import java.util.concurrent.Executor; - -import javax.inject.Inject; -import javax.inject.Named; - -import butterknife.BindView; -import butterknife.ButterKnife; -import jp.wasabeef.glide.transformations.RoundedCornersTransformation; -import ml.docilealligator.infinityforreddit.Infinity; -import ml.docilealligator.infinityforreddit.R; -import ml.docilealligator.infinityforreddit.RPANBroadcast; -import ml.docilealligator.infinityforreddit.RPANComment; -import ml.docilealligator.infinityforreddit.activities.RPANActivity; -import ml.docilealligator.infinityforreddit.adapters.RPANCommentStreamRecyclerViewAdapter; -import ml.docilealligator.infinityforreddit.customtheme.CustomThemeWrapper; -import ml.docilealligator.infinityforreddit.customviews.LinearLayoutManagerBugFixed; -import ml.docilealligator.infinityforreddit.utils.APIUtils; -import ml.docilealligator.infinityforreddit.utils.JSONUtils; -import ml.docilealligator.infinityforreddit.utils.SharedPreferencesUtils; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.WebSocket; -import okhttp3.WebSocketListener; -import retrofit2.Retrofit; - -public class ViewRPANBroadcastFragment extends Fragment { - - public static final String EXTRA_RPAN_BROADCAST = "ERB"; - private static final String IS_MUTE_STATE = "IMS"; - - @BindView(R.id.constraint_layout_exo_rpan_broadcast_playback_control_view) - ConstraintLayout constraintLayout; - @BindView(R.id.player_view_view_rpan_broadcast_fragment) - PlayerView playerView; - @BindView(R.id.subreddit_icon_image_view_exo_rpan_broadcast_playback_control_view) - ImageView subredditIconImageView; - @BindView(R.id.subreddit_name_text_view_exo_rpan_broadcast_playback_control_view) - TextView subredditNameTextView; - @BindView(R.id.username_text_view_exo_rpan_broadcast_playback_control_view) - TextView usernameTextView; - @BindView(R.id.title_text_view_exo_rpan_broadcast_playback_control_view) - TextView titleTextView; - @BindView(R.id.recycler_view_exo_rpan_broadcast_playback_control_view) - RecyclerView recyclerView; - @BindView(R.id.mute_exo_rpan_broadcast_playback_control_view) - ImageButton muteButton; - @BindView(R.id.hd_exo_rpan_broadcast_playback_control_view) - ImageButton hdButton; - @Inject - @Named("strapi") - Retrofit mStrapiRetrofit; - @Inject - @Named("default") - SharedPreferences mSharedPreferences; - @Inject - @Named("current_account") - SharedPreferences mCurrentAccountSharedPreferences; - @Inject - CustomThemeWrapper mCustomThemeWrapper; - @Inject - Executor mExecutor; - @Inject - @Named("rpan") - OkHttpClient okHttpClient; - @Inject - SimpleCache mSimpleCache; - private RPANActivity mActivity; - private RPANBroadcast rpanBroadcast; - private ExoPlayer player; - private DefaultTrackSelector trackSelector; - private DataSource.Factory dataSourceFactory; - private Handler handler; - private RPANCommentStreamRecyclerViewAdapter adapter; - private WebSocket webSocket; - - private boolean wasPlaying; - private boolean isMute = false; - private long resumePosition = -1; - private boolean isDataSavingMode; - - public ViewRPANBroadcastFragment() { - // Required empty public constructor - } - - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, - Bundle savedInstanceState) { - // Inflate the layout for this fragment - View rootView = inflater.inflate(R.layout.fragment_view_rpan_broadcast, container, false); - - ((Infinity) mActivity.getApplication()).getAppComponent().inject(this); - - ButterKnife.bind(this, rootView); - - if (mActivity.typeface != null) { - subredditNameTextView.setTypeface(mActivity.typeface); - usernameTextView.setTypeface(mActivity.typeface); - titleTextView.setTypeface(mActivity.typeface); - } - - rpanBroadcast = getArguments().getParcelable(EXTRA_RPAN_BROADCAST); - - if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT || getResources().getBoolean(R.bool.isTablet)) { - //Set player controller bottom margin in order to display it above the navbar - int resourceId = getResources().getIdentifier("navigation_bar_height", "dimen", "android"); - //LinearLayout controllerLinearLayout = findViewById(R.id.linear_layout_exo_playback_control_view); - ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) constraintLayout.getLayoutParams(); - params.bottomMargin = getResources().getDimensionPixelSize(resourceId); - } else { - //Set player controller right margin in order to display it above the navbar - int resourceId = getResources().getIdentifier("navigation_bar_height", "dimen", "android"); - //LinearLayout controllerLinearLayout = findViewById(R.id.linear_layout_exo_playback_control_view); - ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) constraintLayout.getLayoutParams(); - params.rightMargin = getResources().getDimensionPixelSize(resourceId); - } - - playerView.setControllerVisibilityListener(visibility -> { - switch (visibility) { - case View.GONE: - mActivity.getWindow().getDecorView().setSystemUiVisibility( - View.SYSTEM_UI_FLAG_LAYOUT_STABLE - | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION - | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN - | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION - | View.SYSTEM_UI_FLAG_FULLSCREEN - | View.SYSTEM_UI_FLAG_IMMERSIVE); - playerView.setControllerShowTimeoutMs(0); - break; - case View.VISIBLE: - mActivity.getWindow().getDecorView().setSystemUiVisibility( - View.SYSTEM_UI_FLAG_LAYOUT_STABLE - | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION - | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN); - } - }); - - trackSelector = new DefaultTrackSelector(mActivity); - player = new ExoPlayer.Builder(mActivity).setTrackSelector(trackSelector).build(); - playerView.setPlayer(player); - - wasPlaying = true; - - boolean muteVideo = mSharedPreferences.getBoolean(SharedPreferencesUtils.MUTE_VIDEO, false) || - (mSharedPreferences.getBoolean(SharedPreferencesUtils.MUTE_NSFW_VIDEO, false) && rpanBroadcast.rpanPost.isNsfw); - - if (savedInstanceState != null) { - isMute = savedInstanceState.getBoolean(IS_MUTE_STATE); - if (isMute) { - player.setVolume(0f); - muteButton.setImageResource(R.drawable.ic_mute_24dp); - } else { - player.setVolume(1f); - muteButton.setImageResource(R.drawable.ic_unmute_24dp); - } - } else if (muteVideo) { - isMute = true; - player.setVolume(0f); - muteButton.setImageResource(R.drawable.ic_mute_24dp); - } else { - muteButton.setImageResource(R.drawable.ic_unmute_24dp); - } - - player.addListener(new Player.Listener() { - @Override - public void onTracksChanged(@NonNull Tracks tracks) { - ImmutableList trackGroups = tracks.getGroups(); - if (!trackGroups.isEmpty()) { - if (isDataSavingMode) { - trackSelector.setParameters( - trackSelector.buildUponParameters() - .setMaxVideoSize(720, 720)); - } - - hdButton.setVisibility(View.VISIBLE); - hdButton.setOnClickListener(view -> { - TrackSelectionDialogBuilder builder = new TrackSelectionDialogBuilder(mActivity, getString(R.string.select_video_quality), player, 0); - builder.setShowDisableOption(true); - builder.setAllowAdaptiveSelections(false); - Dialog dialog = builder.build(); - dialog.show(); - if (dialog instanceof AlertDialog) { - ((AlertDialog) dialog).getButton(AlertDialog.BUTTON_POSITIVE).setTextColor(mCustomThemeWrapper.getPrimaryTextColor()); - ((AlertDialog) dialog).getButton(AlertDialog.BUTTON_NEGATIVE).setTextColor(mCustomThemeWrapper.getPrimaryTextColor()); - } - }); - - for (int i = 0; i < trackGroups.size(); i++) { - String mimeType = trackGroups.get(i).getTrackFormat(0).sampleMimeType; - if (mimeType != null && mimeType.contains("audio")) { - muteButton.setVisibility(View.VISIBLE); - muteButton.setOnClickListener(view -> { - if (isMute) { - isMute = false; - player.setVolume(1f); - muteButton.setImageResource(R.drawable.ic_unmute_24dp); - } else { - isMute = true; - player.setVolume(0f); - muteButton.setImageResource(R.drawable.ic_mute_24dp); - } - }); - break; - } - } - } else { - muteButton.setVisibility(View.GONE); - } - } - }); - - Glide.with(mActivity).load(rpanBroadcast.rpanPost.subredditIconUrl) - .apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0))) - .error(Glide.with(mActivity).load(R.drawable.subreddit_default_icon) - .apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0)))) - .into(subredditIconImageView); - subredditNameTextView.setText(rpanBroadcast.rpanPost.subredditName); - usernameTextView.setText(rpanBroadcast.rpanPost.username); - titleTextView.setText(rpanBroadcast.rpanPost.title); - - recyclerView.setOnTouchListener(new View.OnTouchListener() { - float x1; - float x2; - float y1; - float y2; - - @Override - public boolean onTouch(View view, MotionEvent motionEvent) { - switch (motionEvent.getAction()) { - case MotionEvent.ACTION_DOWN: - x1 = motionEvent.getX(); - y1 = motionEvent.getY(); - return true; - case MotionEvent.ACTION_UP: - x2 = motionEvent.getX(); - y2 = motionEvent.getY(); - - if (x1 == x2 && y1 == y2) { - playerView.hideController(); - } - - return true; - } - - return false; - } - }); - adapter = new RPANCommentStreamRecyclerViewAdapter(mActivity); - recyclerView.setAdapter(adapter); - - handler = new Handler(); - - return rootView; - } - - private boolean isBehindLiveWindow(ExoPlaybackException e) { - if (e.type != ExoPlaybackException.TYPE_SOURCE) { - return false; - } - Throwable cause = e.getSourceException(); - while (cause != null) { - if (cause instanceof BehindLiveWindowException) { - return true; - } - cause = cause.getCause(); - } - return false; - } - - private void parseComment(String commentJson) { - mExecutor.execute(() -> { - try { - JSONObject commentObject = new JSONObject(commentJson); - if (commentObject.getString(JSONUtils.TYPE_KEY).equals("new_comment")) { - JSONObject payload = commentObject.getJSONObject(JSONUtils.PAYLOAD_KEY); - RPANComment rpanComment = new RPANComment( - payload.getString(JSONUtils.AUTHOR_KEY), - payload.getString(JSONUtils.AUTHOR_ICON_IMAGE), - payload.getString(JSONUtils.BODY_KEY), - payload.getLong(JSONUtils.CREATED_UTC_KEY)); - - handler.post(() -> { - LinearLayoutManagerBugFixed manager = ((LinearLayoutManagerBugFixed) recyclerView.getLayoutManager()); - boolean shouldScrollToBottom = false; - if (manager != null) { - int lastPosition = manager.findLastCompletelyVisibleItemPosition(); - int currentItemCount = adapter.getItemCount(); - if (currentItemCount > 0 && lastPosition == currentItemCount - 1) { - shouldScrollToBottom = true; - } - } - adapter.addRPANComment(rpanComment); - if (shouldScrollToBottom) { - recyclerView.smoothScrollToPosition(adapter.getItemCount() - 1); - } - }); - } - } catch (JSONException e) { - e.printStackTrace(); - } - }); - } - - @Override - public void onSaveInstanceState(@NonNull Bundle outState) { - super.onSaveInstanceState(outState); - outState.putBoolean(IS_MUTE_STATE, isMute); - } - - @Override - public void onResume() { - super.onResume(); - if (dataSourceFactory == null) { - dataSourceFactory = new CacheDataSource.Factory().setCache(mSimpleCache) - .setUpstreamDataSourceFactory(new DefaultHttpDataSource.Factory().setUserAgent(APIUtils.USER_AGENT)); - // Prepare the player with the source. - player.prepare(); - player.setMediaSource(new HlsMediaSource.Factory(dataSourceFactory).createMediaSource(MediaItem.fromUri(rpanBroadcast.rpanStream.hlsUrl))); - if (mSharedPreferences.getBoolean(SharedPreferencesUtils.LOOP_VIDEO, true)) { - player.setRepeatMode(Player.REPEAT_MODE_ALL); - } else { - player.setRepeatMode(Player.REPEAT_MODE_OFF); - } - if (resumePosition > 0) { - player.seekTo(resumePosition); - } - } - - if (wasPlaying) { - player.setPlayWhenReady(true); - } - - if (webSocket == null) { - Request request = new Request.Builder().url(rpanBroadcast.rpanPost.liveCommentsWebsocketUrl).build(); - CommentStreamWebSocketListener listener = new CommentStreamWebSocketListener(this::parseComment); - webSocket = okHttpClient.newWebSocket(request, listener); - } - } - - @Override - public void onPause() { - super.onPause(); - wasPlaying = player.getPlayWhenReady(); - player.setPlayWhenReady(false); - } - - @Override - public void onDestroy() { - super.onDestroy(); - player.seekToDefaultPosition(); - player.stop(true); - player.release(); - - if (webSocket != null) { - webSocket.cancel(); - } - } - - @Override - public void onAttach(@NonNull Context context) { - super.onAttach(context); - mActivity = (RPANActivity) context; - } - - private static class CommentStreamWebSocketListener extends WebSocketListener { - MessageReceivedListener messageReceivedListener; - - CommentStreamWebSocketListener(MessageReceivedListener messageReceivedListener) { - this.messageReceivedListener = messageReceivedListener; - } - - @Override - public void onMessage(@NonNull WebSocket webSocket, @NonNull String text) { - messageReceivedListener.onMessage(text); - } - - interface MessageReceivedListener { - void onMessage(String text); - } - } -} \ No newline at end of file diff --git a/app/src/main/res/drawable-night/ic_rpan_24dp.xml b/app/src/main/res/drawable-night/ic_rpan_24dp.xml deleted file mode 100644 index 1c8156c1..00000000 --- a/app/src/main/res/drawable-night/ic_rpan_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_rpan_24dp.xml b/app/src/main/res/drawable/ic_rpan_24dp.xml deleted file mode 100644 index bb61e6ff..00000000 --- a/app/src/main/res/drawable/ic_rpan_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/layout/activity_rpanactivity.xml b/app/src/main/res/layout/activity_rpanactivity.xml deleted file mode 100644 index b7e22b40..00000000 --- a/app/src/main/res/layout/activity_rpanactivity.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/exo_rpan_broadcast_playback_control_view.xml b/app/src/main/res/layout/exo_rpan_broadcast_playback_control_view.xml deleted file mode 100644 index 4e224e24..00000000 --- a/app/src/main/res/layout/exo_rpan_broadcast_playback_control_view.xml +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_view_rpan_broadcast.xml b/app/src/main/res/layout/fragment_view_rpan_broadcast.xml deleted file mode 100644 index abab4f52..00000000 --- a/app/src/main/res/layout/fragment_view_rpan_broadcast.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/item_rpan_comment.xml b/app/src/main/res/layout/item_rpan_comment.xml deleted file mode 100644 index 54ace9c5..00000000 --- a/app/src/main/res/layout/item_rpan_comment.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/menu/rpan_activity.xml b/app/src/main/res/menu/rpan_activity.xml deleted file mode 100644 index bb165fd4..00000000 --- a/app/src/main/res/menu/rpan_activity.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 14519473..a5060585 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -1021,12 +1021,9 @@ Zpráva: %2$s" Stále chcete tuto možnost povolit?" "Odpovědět" - "RPAN" "Příspěvek galerie" "Trendy" - "Sdílet RPAN odkaz" "Sdílet odkaz příspěvku" - "RPAN" "Trendy" "Získávat oznámení o odpovědích na příspěvek" "Galerie" @@ -1056,9 +1053,6 @@ Pokud ano, přejmenujte je, než povolíte Material You." "Obrázek úspěšně nahrán. Klikněte znovu na tlačítko obrázku pro zobrazení nahraných obrázků." "Nepodařilo se získat bitmapu obrázku" "Nepodařilo se nahrát obrázek" - "Nepodařilo se načíst vysílání RPAN" - "Nepodařilo se parsovat vysílání RPAN" - "Nepodařilo se parsovat vysílání RPAN" "Hledat komentáře" "Obrázek se stále nahrává. Čekejte prosím." "Získávání trendů selhalo. diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index e099d98d..15ef5334 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -1104,12 +1104,9 @@ Nachricht: %2$s" Möchtest du trotzdem fortfahren?" "Antworten" - "RPAN" "Galeriebeitrag" "Trending" - "Teile RPAN-Link" "Teile Beitragslink" - "RPAN" "Trending" "Benachrichtigungen für Antworten auf Beiträge empfangen" "Galerie" @@ -1141,9 +1138,6 @@ Benenne diese Themen sonst neu." "Bild erfolgreich hochgeladen. Klicken Sie nochmal auf Bilder um hochgeladene Bilder zu sehen." "Konnte das Bitmap des Bildes nicht herunterladen" "Das Bild konnte nicht hochgeladen werden" - "RPAN Broadcasts konnten nicht geladen werden" - "RPAN Broadcasts konnten nicht gelesen werden" - "RPAN Broadcast konnte nicht gelesen werden" "Kommentare durchsuchen" "Ein Bild wird noch hochgeladen. Bitte warten Sie." diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 2eb93d6b..ef5f352b 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -1074,12 +1074,9 @@ Mensaje: %2$s" ¿Seguro que quieres activarlo?" "Responder" - "RPAN" "Publicación de galería" "Tendencias" - "Compartir enlace de RPAN" "Compartir enlace de publicación" - "RPAN" "Tendencias" "Recibir notificaciones de respuesta a publicaciones" "Galería" @@ -1109,9 +1106,6 @@ De lo contrario, cambia el nombre antes de habilitar Material You." "Imagen subida correctamente. Haga clic en el botón de imagen nuevamente para ver las imágenes cargadas." "No es posible obtener el mapa de bits de la imagen" "No es posible subir la imagen" - "No es posible cargar transmisiones RPAN" - "No es posible analizar las transmisiones RPAN" - "No es posible analizar la transmisión RPAN" "Buscar comentarios" "Aún se está cargando una imagen. Espere por favor." "Falló la obtención de las búsquedas de tendencias. diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 75269275..da8f486c 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -1091,11 +1091,8 @@ Les onglets pourraient perdre tout leur contenu quand vous passez d'un onglet à Vous voulez toujours l'activer ?" "Répondre" - "RPAN" "Tendance" - "Partager le lien RPAN" "Partager le lien du Post" - "RPAN" "Tendance" "Recevoir des notifications de réponse de publication" "Gallerie" @@ -1124,9 +1121,6 @@ Sinon, renommez-les avant d'activer Material You." "Image uploadée avec succès. Clique sur le bouton image de nouveau pour voir les images uploadées." "Impossible d'obtenir le bitmap de l'image" "Impossible d'uploader l'image" - "Impossible de charger les diffusions RPAN" - "Impossible d'analyser les diffusions RPAN" - "Impossible d'analyser la diffusion RPAN" "Chercher des commentaires" "Une image est toujours sn train d'être uploadée. Merci d'attendre" "Échec de la récupération des recherches de tendance. diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index a144a2cd..98906969 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -1010,12 +1010,9 @@ La riproduzione automatica video è disabilitata" Vuoi comunque abilitare l'opzione?" "Rispondi" - "RPAN" "Galleria post" "Popolari" - "Condividi link RPAN" "Condividi post link" - "RPAN" "Popolari" "Ricevi notifiche per le risposte" "Galleria" @@ -1045,9 +1042,6 @@ Se hai dei temi con questi nomi devi cambiarli prima di attivare la Personalizza "Immagine caricata. Clicca sul pulsante delle immagini per vedere le altre immagini caricate" "Impossibile prendere il bitmap dell'immagine" "Impossibile caricare l'immagine" - "Impossibile caricare RPAN" - "Impossibile analizzare i broadcast RPAN" - "Impossibile analizzare il broadcast RPAN" "Cerca tra i commenti" "Attendere prego. Immagine in caricamento" "Pagina non caricata. Tocca per riprovare" diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 0f2dada4..23fda94d 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -1009,12 +1009,9 @@ Bericht: %2$s" Wil je het nog steeds activeren?" "Antwoord" - "RPAN" "Gallerijpost" "Trending" - "Deel RPAN Link" "Deel Post Link" - "RPAN" "Trending" "Ontvang Post Reactie Notificaties" "Gallerij" @@ -1039,7 +1036,6 @@ Zo wel, hernoem ze voordat je Material You aanzet." "Uploaden" "Afbeelding succesvol geüpload. Klik de afbeelding knop nogmaals om de geüploade afbeeldingen te zien." "Niet in staat de afbeelding te uploaden" - "Kan RPAN uitzending Niet laden" "Zoek reacties" "Een afbeelding is nog aan het uploaden. Even geduld aub." "Geen trending zoekopdrachten gevonden. Tik om het opnieuw te proberen." diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index ac6a4d6a..d943c290 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -1019,12 +1019,9 @@ Mensagem: %2$s" Ainda deseja ativá-lo?" "Responder" - "RPAN" "Postar Galeria" "Tendências" - "Compartilhar Link de RPAN" "Compartilhar Link do Post" - "RPAN" "Em Alta" "Receber Notificações de Respostas às Postagens" "Galeria" @@ -1054,9 +1051,6 @@ Se você tiver, os renomeie antes de ativar o Material You." "Imagem enviada com sucesso. Clique novamente no botão de imagem para ver as imagem enviadas." "Erro ao receber o bitmap da imagem" "Erro ao enviar a imagem" - "Não foi possível carregar transmissões RPAN" - "Não foi possível analisar transmissões RPAN" - "Não foi possível analisar transmissão RPAN" "Procurar Comentários" "Uma imagem ainda está sendo enviada. Por favor, aguarde." "Busca de pesquisas em alta falhou. diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 5c58d2df..2c28c963 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -1020,12 +1020,9 @@ Mensagem: %2$s" Ainda deseja ativar esta opção?" "Responder" - "RPAN" "Publicação de Galeria" "Tendências" - "Partilhar Endereço RPAN" "Partilhar Endereço da Publicação" - "RPAN" "Tendências" "Receber notificações de respostas de publicações" "Galeria" @@ -1055,9 +1052,6 @@ Caso contrário, altere o nome antes de ativar Material You" "Imagem enviada com sucesso. Clicar no botão da imagem para ver as imagens enviadas." "Incapaz de obter o bitmap da imagem" "Incapaz de enviar a imagem" - "Não é possível carregar as emissões RPAN" - "Não é possível analisar as emissões de RPAN" - "Não é possível analisar a emissão de RPAN" "Pesquisar Comentários" "Uma imagem ainda a ser enviada. Por favor aguarde." "A obtenção de tendências falharam. diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index 01f535d2..d63b473a 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -1063,12 +1063,9 @@ Mesaj: %2$s" Încă dorești să-l activezi?" "Răspunde" - "RPAN" "Postare Galerie" "În Tendințe" - "Distribuie Link-ul RPAN" "Distribuie Link-ul Postării" - "RPAN" "În Tendințe" "Primește notificări de răspuns la postări" "Galerie" @@ -1098,9 +1095,6 @@ Mesaj: %2$s" "Imaginea a fost încărcată cu succes. Apasă din nou pe butonul de imagine pentru a vedea imaginile încărcate." "Nu s-a putut obține bitmap-ul imaginii" "Nu s-a putut încărca imaginea" - "Nu s-a putut încărca emisiunile RPAN" - "Nu s-a putut afișa emisiunile RPAN" - "Nu s-a putut afișa emisiunea RPAN" "Caută Comentariile" "O imagine este încă în curs de încărcare. Te rugăm să aștepți." "Obținerea căutărilor în tendințe a eșuat. diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 704c59ee..35a4b82d 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -1033,12 +1033,9 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd Всё ещё хотите включить его?" "Ответ" - "RPAN" "Пост в галерее" "Популярное" - "Поделиться ссылкой RPAN" "Поделиться ссылкой на пост" - "RPAN" "Популярное" "Получать уведомления об ответах на пост" "Галерея" @@ -1068,9 +1065,6 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd "Изображение успешно загружено. Нажмите кнопку «Изображение» ещё раз, чтобы просмотреть загруженные изображения." "Невозможно получить растровое изображение" "Невозможно загрузить изображение" - "Невозможно загрузить широковещательные сообщения RPAN" - "Невозможно разобрать широковещательные сообщения RPAN" - "Невозможно разобрать широковещательную передачу RPAN" "Поиск комментариев" "Изображение загружается, подождите." "Невозможно получить популярные поисковые запросы. diff --git a/app/src/main/res/values-tr-rTR/strings.xml b/app/src/main/res/values-tr-rTR/strings.xml index 19308eb3..3177d814 100644 --- a/app/src/main/res/values-tr-rTR/strings.xml +++ b/app/src/main/res/values-tr-rTR/strings.xml @@ -1063,12 +1063,9 @@ Yine de etkinleştirmek istiyor musunuz?" "Yanıtla" - "Canlı Yayın" "Galeri Gönderisi" "Trendler" - "Canlı Yayın Bağlantısını Paylaş" "Gönderi Bağlantısını Paylaş" - "Canlı Yayın" "Trendler" "Gönderi yanıtlanınca bildirimlerini al" "Galeri" @@ -1098,9 +1095,6 @@ Yoksa, Material You'u etkinleştirmeden önce bunları yeniden adlandırın.""Fotoğraf başarıyla yüklendi. Yüklenen fotoğrafları görmek için fotoğraf düğmesine tekrar tıklayın." "Fotoğrafın bitmap'i alınamıyor" "Fotoğraf yüklenemiyor" - "Canlı Yayınlar yüklenemiyor" - "Canlı Yayınlar ayrıştırılamıyor" - "Canlı Yayın ayrıştırılamıyor" "Yorumları Ara" "Hâlâ bir fotoğraf yükleniyor. Lütfen bekleyin." "Trend aramalar getirilemedi. diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 23cae648..fbb011e6 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -1013,12 +1013,9 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd Усе ще бажаєте ввімкнути це?" "Відповісти" - "RPAN" "Допис галереї" "Тенденції" - "Поширити ланку RPAN" "Поширити ланку допису" - "RPAN" "Тенденції" "Отримувати сповіщення про відповіді на дописи" "Галерея" @@ -1048,9 +1045,6 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd "Зображення успішно відвантажене. Клацніть кнопку зображення ще раз, щоб переглянути відвантажені зображення." "Неможливо отримати bitmap зображення" "Неможливо відвантажити зображення" - "Не вдалося завантажити трансляції RPAN" - "Не вдалося проаналізувати трансляції RPAN" - "Не вдалося проаналізувати трансляцію RPAN" "Пошук коментарів" "Зображення все ще завантажується. Будь ласка, зачекайте." "Не вдалося отримати тенденції пошуку. diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index 7ef0732c..89e00bab 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -1034,12 +1034,9 @@ Thông báo: %2$s" Bạn có vẫn muốn bật tuỳ chọn này không?" "Trả lời" - "RPAN" "Bài đăng bộ sưu tập" "Trending" - "Chia sẻ đường link RPAN" "Chia sẻ đường link bài đăng" - "RPAN" "Trending" "Nhận thông báo trả lời trong bài đăng" "Bộ sưu tập" @@ -1069,9 +1066,6 @@ Nếu không thì thay tên chúng trước khi Bật Material You." "Tải hình ảnh thành công. Ấn vào nút hình ảnh lần nữa để thấy hình ảnh vửa tải lên." "Không thể lấy bitmap của hình ảnh" "Không thể tải hình ảnh lên" - "Không thể tải broadcast RPAN" - "Không thể xử lý broadcast RPAN" - "Không thể xử lý broadcast RPAN" "Tìm kiếm bình luận" "Hình ảnh vẫn đang tải. Vui lòng đợi." "Lấy mục tìm kiếm thịnh hành thất bại. diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index d9e962bd..2d2bce43 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -1102,12 +1102,9 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd 仍然要继续吗?" "回复" - "直播" "相册帖" "热门" - "分享直播链接" "分享帖子链接" - "直播" "热门" "接收帖子回复提醒" "相册" @@ -1137,9 +1134,6 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd "上传图片成功。再次点击图片按钮查看已上传的图片。" "无法获取图片位图" "无法上传图片" - "无法加载 RPAN 直播" - "无法解析 RPAN 直播" - "无法解析 RPAN 直播" "搜索评论" "仍有图片正在上传,请稍候。" "获取热搜失败。 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 51f70012..d4986fc8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -39,7 +39,6 @@ Post Filter Users Select a Multireddit - RPAN Gallery Post Trending Wiki @@ -91,7 +90,6 @@ Add to Post Filter Delete Logs Create GitHub Issue - Share RPAN Link Share Post Link Go to Wiki Playback Speed @@ -139,7 +137,6 @@ History Inbox Inbox (%1$,d) - RPAN Trending Upvoted Downvoted @@ -1211,10 +1208,6 @@ Unable to get the bitmap of the image Unable to upload the image - Cannot load RPAN broadcasts - Cannot parse RPAN broadcasts - Cannot parse RPAN broadcast - Search Comments An image is still being uploaded. Please wait. -- cgit v1.2.3