aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2020-03-30 06:54:55 +0000
committerAlex Ning <chineseperson5@gmail.com>2020-03-30 06:54:55 +0000
commit07bca6d6356ef51ce38a9190bf7be9d51bdd89f7 (patch)
tree2a446cf935e2972b21d0c24496ae81219c0c0964
parent84d4679aa9dbed4bca22f23d39cb397727a58722 (diff)
downloadinfinity-for-reddit-07bca6d6356ef51ce38a9190bf7be9d51bdd89f7.tar
infinity-for-reddit-07bca6d6356ef51ce38a9190bf7be9d51bdd89f7.tar.gz
infinity-for-reddit-07bca6d6356ef51ce38a9190bf7be9d51bdd89f7.tar.bz2
infinity-for-reddit-07bca6d6356ef51ce38a9190bf7be9d51bdd89f7.tar.lz
infinity-for-reddit-07bca6d6356ef51ce38a9190bf7be9d51bdd89f7.tar.xz
infinity-for-reddit-07bca6d6356ef51ce38a9190bf7be9d51bdd89f7.tar.zst
infinity-for-reddit-07bca6d6356ef51ce38a9190bf7be9d51bdd89f7.zip
Fix some issues of searching.
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Activity/MainActivity.java1
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchActivity.java6
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchResultActivity.java4
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewMultiRedditDetailActivity.java1
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSubredditDetailActivity.java2
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewUserDetailActivity.java1
-rw-r--r--app/src/main/res/xml/advanced_preferences.xml2
7 files changed, 7 insertions, 10 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/MainActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/MainActivity.java
index 3cc64c30..0a768805 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/MainActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/MainActivity.java
@@ -745,7 +745,6 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb
return true;
case R.id.action_search_main_activity:
Intent intent = new Intent(this, SearchActivity.class);
- intent.putExtra(SearchActivity.EXTRA_SEARCH_ONLY_SUBREDDITS, false);
startActivity(intent);
return true;
case R.id.action_refresh_main_activity:
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchActivity.java
index e075d9a5..0160401a 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchActivity.java
@@ -171,9 +171,9 @@ public class SearchActivity extends BaseActivity {
Intent intent = getIntent();
if (intent.hasExtra(EXTRA_SUBREDDIT_NAME)) {
- subredditName = intent.getExtras().getString(EXTRA_SUBREDDIT_NAME);
+ subredditName = intent.getStringExtra(EXTRA_SUBREDDIT_NAME);
subredditNameTextView.setText(subredditName);
- subredditIsUser = intent.getExtras().getBoolean(EXTRA_SUBREDDIT_IS_USER);
+ subredditIsUser = intent.getBooleanExtra(EXTRA_SUBREDDIT_IS_USER, false);
}
}
@@ -196,7 +196,7 @@ public class SearchActivity extends BaseActivity {
simpleSearchView.setIconsColor(toolbarPrimaryTextAndIconColorColor);
simpleSearchView.setTextColor(toolbarPrimaryTextAndIconColorColor);
simpleSearchView.setBackIconColor(toolbarPrimaryTextAndIconColorColor);
- simpleSearchView.setHintTextColor(mCustomThemeWrapper.getSecondaryTextColor());
+ simpleSearchView.setHintTextColor(mCustomThemeWrapper.getToolbarPrimaryTextAndIconColor());
searchInTextView.setTextColor(mCustomThemeWrapper.getColorAccent());
subredditNameTextView.setTextColor(mCustomThemeWrapper.getPrimaryTextColor());
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchResultActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchResultActivity.java
index 7c8f25a5..dc168e74 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchResultActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchResultActivity.java
@@ -231,7 +231,9 @@ public class SearchResultActivity extends BaseActivity implements SortTypeSelect
return true;
case R.id.action_search_search_result_activity:
Intent intent = new Intent(this, SearchActivity.class);
- intent.putExtra(SearchActivity.EXTRA_SEARCH_ONLY_SUBREDDITS, false);
+ if (mSubredditName != null && !mSubredditName.equals("")) {
+ intent.putExtra(SearchActivity.EXTRA_SUBREDDIT_NAME, mSubredditName);
+ }
intent.putExtra(SearchActivity.EXTRA_QUERY, mQuery);
finish();
startActivity(intent);
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewMultiRedditDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewMultiRedditDetailActivity.java
index 0fb5b439..d6d32b67 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewMultiRedditDetailActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewMultiRedditDetailActivity.java
@@ -215,7 +215,6 @@ public class ViewMultiRedditDetailActivity extends BaseActivity implements SortT
return true;
case R.id.action_search_view_multi_reddit_detail_activity:
Intent intent = new Intent(this, SearchActivity.class);
- intent.putExtra(SearchActivity.EXTRA_SEARCH_ONLY_SUBREDDITS, false);
startActivity(intent);
return true;
case R.id.action_refresh_view_multi_reddit_detail_activity:
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSubredditDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSubredditDetailActivity.java
index 474a5912..4cd8035d 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSubredditDetailActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSubredditDetailActivity.java
@@ -662,8 +662,6 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
case R.id.action_search_view_subreddit_detail_activity:
Intent intent = new Intent(this, SearchActivity.class);
intent.putExtra(SearchActivity.EXTRA_SUBREDDIT_NAME, subredditName);
- intent.putExtra(SearchActivity.EXTRA_SUBREDDIT_IS_USER, false);
- intent.putExtra(SearchActivity.EXTRA_SEARCH_ONLY_SUBREDDITS, false);
startActivity(intent);
return true;
case R.id.action_refresh_view_subreddit_detail_activity:
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewUserDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewUserDetailActivity.java
index 96adba7b..c6bfec6a 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewUserDetailActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewUserDetailActivity.java
@@ -583,7 +583,6 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
Intent intent = new Intent(this, SearchActivity.class);
intent.putExtra(SearchActivity.EXTRA_SUBREDDIT_NAME, username);
intent.putExtra(SearchActivity.EXTRA_SUBREDDIT_IS_USER, true);
- intent.putExtra(SearchActivity.EXTRA_SEARCH_ONLY_SUBREDDITS, false);
startActivity(intent);
return true;
case R.id.action_refresh_view_user_detail_activity:
diff --git a/app/src/main/res/xml/advanced_preferences.xml b/app/src/main/res/xml/advanced_preferences.xml
index e475af51..432623d3 100644
--- a/app/src/main/res/xml/advanced_preferences.xml
+++ b/app/src/main/res/xml/advanced_preferences.xml
@@ -28,7 +28,7 @@
<Preference
android:icon="@drawable/ic_info_preference_24dp"
- app:summary="@string/settings_custom_theme_cannot_apply_to_settings_page_summary"
+ app:summary="@string/settings_advanced_settings_summary"
app:enabled="false" />
</PreferenceScreen> \ No newline at end of file