aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2021-07-18 14:43:58 +0000
committerAlex Ning <chineseperson5@gmail.com>2021-07-18 14:43:58 +0000
commit3ecb39bc3edbccfb1fccf2a097a77bf3361d3ac8 (patch)
tree6dde72d37edf638f2669208cea7cfbb0866498a6 /app/src
parentf77ba0ef2329e7fed7a294d5baa654e5851e696d (diff)
downloadinfinity-for-reddit-3ecb39bc3edbccfb1fccf2a097a77bf3361d3ac8.tar
infinity-for-reddit-3ecb39bc3edbccfb1fccf2a097a77bf3361d3ac8.tar.gz
infinity-for-reddit-3ecb39bc3edbccfb1fccf2a097a77bf3361d3ac8.tar.bz2
infinity-for-reddit-3ecb39bc3edbccfb1fccf2a097a77bf3361d3ac8.tar.lz
infinity-for-reddit-3ecb39bc3edbccfb1fccf2a097a77bf3361d3ac8.tar.xz
infinity-for-reddit-3ecb39bc3edbccfb1fccf2a097a77bf3361d3ac8.tar.zst
infinity-for-reddit-3ecb39bc3edbccfb1fccf2a097a77bf3361d3ac8.zip
Open search results when clicking a trending search.
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/TrendingActivity.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/TrendingActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/TrendingActivity.java
index 1bc8d3e3..0bfe7efe 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/TrendingActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/TrendingActivity.java
@@ -1,5 +1,6 @@
package ml.docilealligator.infinityforreddit.activities;
+import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
@@ -144,7 +145,10 @@ public class TrendingActivity extends BaseActivity {
dataSavingMode, disableImagePreview, new TrendingSearchRecyclerViewAdapter.ItemClickListener() {
@Override
public void onClick(TrendingSearch trendingSearch) {
-
+ Intent intent = new Intent(TrendingActivity.this, SearchResultActivity.class);
+ intent.putExtra(SearchResultActivity.EXTRA_QUERY, trendingSearch.queryString);
+ intent.putExtra(SearchResultActivity.EXTRA_TRENDING_SOURCE, "trending");
+ startActivity(intent);
}
});
recyclerView.setLayoutManager(new LinearLayoutManager(this));