Skip to content

Commit

Permalink
Release 3.21.0
Browse files Browse the repository at this point in the history
- Added integration with Reddits new /r/all filter.
- Added background sync of subs, multis & filters. Triggered daily when subreddit selection activity is opened.
- Added option to open a subreddit in a new activity via post options dialog.
- Added subscription status icon to view all subreddits activity.
- Added score abbreviations to align with Reddit scoring change (full score still visible in info panel).
 - Various other improvements & bug fixes.
  • Loading branch information
micwallace committed Dec 24, 2016
1 parent 3706a18 commit 8d2c6f1
Show file tree
Hide file tree
Showing 23 changed files with 400 additions and 167 deletions.
6 changes: 3 additions & 3 deletions reddinator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.android.tools.build:gradle:2.2.3'
}
}

Expand Down Expand Up @@ -48,8 +48,8 @@ android {


dependencies {
compile 'com.android.support:support-v4:25.0.0'
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:support-v4:25.1.0'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'com.joanzapata.android:android-iconify:1.0.11'
Expand Down
62 changes: 27 additions & 35 deletions reddinator/reddinator-reddinator.iml
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
Expand All @@ -82,39 +74,39 @@
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/builds" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/25.0.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/25.0.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/25.1.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/25.1.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/23.4.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-compat/25.0.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-core-ui/25.0.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-core-utils/25.0.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-fragment/25.0.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-media-compat/25.0.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/25.0.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/25.0.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-compat/25.1.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-core-ui/25.1.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-core-utils/25.1.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-fragment/25.1.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-media-compat/25.1.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/25.1.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/25.1.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.kobakei/ratethisapp/0.0.4/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.larswerkman/HoloColorPicker/1.5/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.sothree.slidinguppanel/library/3.3.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/de.cketti.library.changelog/ckchangelog/1.2.2/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/net.rdrei.android.dirchooser/library/3.2/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-runtime-classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-verifier" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-resources" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-support" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/restart-dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
Expand All @@ -124,26 +116,26 @@
</content>
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="support-annotations-25.0.0" level="project" />
<orderEntry type="library" exported="" name="okio-1.9.0" level="project" />
<orderEntry type="library" exported="" name="support-annotations-25.1.0" level="project" />
<orderEntry type="library" exported="" name="android-iconify-1.0.11" level="project" />
<orderEntry type="library" exported="" name="HoloColorPicker-1.5" level="project" />
<orderEntry type="library" exported="" name="support-v4-25.0.0" level="project" />
<orderEntry type="library" exported="" name="support-media-compat-25.0.0" level="project" />
<orderEntry type="library" exported="" name="support-compat-25.0.0" level="project" />
<orderEntry type="library" exported="" name="support-fragment-25.0.0" level="project" />
<orderEntry type="library" exported="" name="animated-vector-drawable-25.0.0" level="project" />
<orderEntry type="library" exported="" name="support-compat-25.1.0" level="project" />
<orderEntry type="library" exported="" name="support-fragment-25.1.0" level="project" />
<orderEntry type="library" exported="" name="animated-vector-drawable-25.1.0" level="project" />
<orderEntry type="library" exported="" name="support-v4-25.1.0" level="project" />
<orderEntry type="library" exported="" name="library-3.3.1" level="project" />
<orderEntry type="library" exported="" name="option-1.3" level="project" />
<orderEntry type="library" exported="" name="ckchangelog-1.2.2" level="project" />
<orderEntry type="library" exported="" name="library-3.2" level="project" />
<orderEntry type="library" exported="" name="support-core-ui-25.0.0" level="project" />
<orderEntry type="library" exported="" name="okhttp-3.4.1" level="project" />
<orderEntry type="library" exported="" name="support-core-ui-25.1.0" level="project" />
<orderEntry type="library" exported="" name="ratethisapp-0.0.4" level="project" />
<orderEntry type="library" exported="" name="commons-lang3-3.4" level="project" />
<orderEntry type="library" exported="" name="support-media-compat-25.1.0" level="project" />
<orderEntry type="library" exported="" name="recyclerview-v7-23.4.0" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-25.0.0" level="project" />
<orderEntry type="library" exported="" name="support-vector-drawable-25.0.0" level="project" />
<orderEntry type="library" exported="" name="support-core-utils-25.0.0" level="project" />
<orderEntry type="library" exported="" name="support-vector-drawable-25.1.0" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-25.1.0" level="project" />
<orderEntry type="library" exported="" name="support-core-utils-25.1.0" level="project" />
</component>
</module>
Binary file modified reddinator/reddinator-release.apk
Binary file not shown.
4 changes: 2 additions & 2 deletions reddinator/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="au.com.wallaceit.reddinator"
android:versionCode="59"
android:versionName="3.20.2">
android:versionCode="60"
android:versionName="3.21.0">

<uses-permission android:name="android.permission.INTERNET" />
<!-- Needed by some activity_webview HTML5 video implementations (Bug report received for Android 4.1) -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Color;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
Expand Down Expand Up @@ -55,6 +56,8 @@
import au.com.wallaceit.reddinator.tasks.SubscriptionEditTask;
import au.com.wallaceit.reddinator.tasks.WidgetVoteTask;

import static android.content.Intent.ACTION_VIEW;

public class FeedItemDialogActivity extends Activity implements SubscriptionEditTask.Callback, ThemeHelper.ThemeInstallInterface {
public static final String EXTRA_CURRENT_FEED_PATH = "feedPath";
public static final String EXTRA_IS_THEME = "isTheme";
Expand Down Expand Up @@ -158,6 +161,13 @@ public void onDismiss(DialogInterface dialog) {
}
}
break;
case "open_subreddit":
Intent intent = new Intent(FeedItemDialogActivity.this, MainActivity.class);
intent.setAction(ACTION_VIEW);
intent.setData(Uri.parse(Reddinator.REDDIT_BASE_URL + "/r/" + getIntent().getStringExtra(Reddinator.ITEM_SUBREDDIT)));
startActivity(intent);
close(0);
break;
case "view_domain":
// view listings for the domain of this item
String domain = getIntent().getStringExtra(Reddinator.ITEM_DOMAIN);
Expand All @@ -167,7 +177,7 @@ public void onDismiss(DialogInterface dialog) {
global.openSubredditFeed(FeedItemDialogActivity.this, Reddinator.REDDIT_BASE_URL + feedPath);
close(0);
} else {
Intent intent = new Intent(FeedItemDialogActivity.this, MainActivity.class);
intent = new Intent(FeedItemDialogActivity.this, MainActivity.class);
intent.putExtra(MainActivity.EXTRA_FEED_PATH, feedPath);
intent.putExtra(MainActivity.EXTRA_FEED_NAME, domain);
close(2, intent);
Expand Down Expand Up @@ -344,8 +354,10 @@ private class ItemOptionsAdapter extends BaseAdapter {
canViewDomain = (domain.indexOf("self.")!=0 && !global.getSubredditManager().getCurrentFeedName(widgetId).equals(domain));
}

if (canViewSubreddit)
if (canViewSubreddit) {
options.add(new String[]{"open_subreddit", getString(R.string.item_option_open_subreddit, getIntent().getStringExtra(Reddinator.ITEM_SUBREDDIT))});
options.add(new String[]{"view_subreddit", getString(R.string.item_option_view_subreddit, getIntent().getStringExtra(Reddinator.ITEM_SUBREDDIT))});
}

if (canViewDomain)
options.add(new String[]{"view_domain", getString(R.string.item_option_view_domain, domain)});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ protected JSONArray doInBackground(Void... none) {
if (viewThemes) {
tempArray = filterThemes(tempArray);
} else {
tempArray = global.getSubredditManager().filterFeed(0, tempArray, loadMore?data:null, isAll, !global.mRedditData.isLoggedIn());
tempArray = global.getSubredditManager().filterFeed(0, tempArray, loadMore?data:null, (isAll && !global.mRedditData.isLoggedIn()), !global.mRedditData.isLoggedIn());
}
if (tempArray.length() == 0)
endOfFeed = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import au.com.wallaceit.reddinator.core.Utilities;
import au.com.wallaceit.reddinator.service.MailCheckReceiver;
import au.com.wallaceit.reddinator.service.WidgetCommon;
import au.com.wallaceit.reddinator.tasks.SyncUserDataTask;

public class PrefsFragment extends PreferenceFragment implements SharedPreferences.OnSharedPreferenceChangeListener, DirectoryChooserFragment.OnFragmentInteractionListener {
public int mAppWidgetId;
Expand Down Expand Up @@ -77,6 +78,14 @@ public boolean onPreferenceClick(Preference preference) {
return true;
}
});
Preference refreshbtn = findPreference("refresh_data");
refreshbtn.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
new SyncUserDataTask(getActivity(), null, true, 0).execute();
return false;
}
});
}

addPreferencesFromResource(R.xml.utility_preferences);
Expand Down
Loading

0 comments on commit 8d2c6f1

Please sign in to comment.