widget: default to showing fresh articles instead of global unread
This commit is contained in:
parent
4d9949aabe
commit
dbe6865980
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.fox.ttrss"
|
package="org.fox.ttrss"
|
||||||
android:versionCode="307"
|
android:versionCode="308"
|
||||||
android:versionName="1.87" >
|
android:versionName="1.88" >
|
||||||
|
|
||||||
<uses-sdk
|
<uses-sdk
|
||||||
android:minSdkVersion="15"
|
android:minSdkVersion="15"
|
||||||
|
@ -63,6 +63,8 @@ public class WidgetUpdateService extends Service {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
final int feedId = m_prefs.getBoolean("widget_show_fresh", true) ? -6 : 0;
|
||||||
|
|
||||||
SimpleLoginManager loginManager = new SimpleLoginManager() {
|
SimpleLoginManager loginManager = new SimpleLoginManager() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -98,6 +100,7 @@ public class WidgetUpdateService extends Service {
|
|||||||
HashMap<String, String> umap = new HashMap<String, String>() {
|
HashMap<String, String> umap = new HashMap<String, String>() {
|
||||||
{
|
{
|
||||||
put("op", "getUnread");
|
put("op", "getUnread");
|
||||||
|
put("feed_id", String.valueOf(feedId));
|
||||||
put("sid", fSessionId);
|
put("sid", fSessionId);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -127,7 +130,7 @@ public class WidgetUpdateService extends Service {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
||||||
view.setTextViewText(R.id.counter, getString(R.string.app_name));
|
view.setTextViewText(R.id.counter, "?");
|
||||||
manager.updateAppWidget(thisWidget, view);
|
manager.updateAppWidget(thisWidget, view);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom|center"
|
android:layout_gravity="bottom|center"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:text="123"
|
android:text="@string/app_name"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
android:textColor="@android:color/primary_text_dark"
|
android:textColor="@android:color/primary_text_dark"
|
||||||
android:textSize="13sp" />
|
android:textSize="13sp" />
|
||||||
|
@ -217,4 +217,6 @@
|
|||||||
<string name="prefs_build_timestamp">%1$s</string>
|
<string name="prefs_build_timestamp">%1$s</string>
|
||||||
<string name="prefs_build_timestamp_title">Build timestamp</string>
|
<string name="prefs_build_timestamp_title">Build timestamp</string>
|
||||||
<string name="crash_dialog_text">Unfortunately, Tiny Tiny RSS has stopped. Submit crash report to tt-rss.org?</string>
|
<string name="crash_dialog_text">Unfortunately, Tiny Tiny RSS has stopped. Submit crash report to tt-rss.org?</string>
|
||||||
|
<string name="prefs_widget_show_fresh">Show Fresh articles</string>
|
||||||
|
<string name="prefs_widget_show_fresh_summary">Instead of total unread display amount of Fresh articles</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -171,6 +171,13 @@
|
|||||||
android:summary="@string/offline_image_cache_enabled_summary"
|
android:summary="@string/offline_image_cache_enabled_summary"
|
||||||
android:title="@string/offline_image_cache_enabled" />
|
android:title="@string/offline_image_cache_enabled" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
<PreferenceCategory android:title="Widget" >
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:defaultValue="true"
|
||||||
|
android:key="widget_show_fresh"
|
||||||
|
android:title="@string/prefs_widget_show_fresh"
|
||||||
|
android:summary="@string/prefs_widget_show_fresh_summary" />
|
||||||
|
</PreferenceCategory>
|
||||||
<PreferenceCategory android:title="@string/debugging" >
|
<PreferenceCategory android:title="@string/debugging" >
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
|
Loading…
Reference in New Issue
Block a user