mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-18 20:08:53 +01:00
Added option for #130
This commit is contained in:
@@ -61,6 +61,10 @@ public class ConversationPrefsHelper {
|
|||||||
return getBoolean(SettingsFragment.NOTIFICATION_CALL_BUTTON, false);
|
return getBoolean(SettingsFragment.NOTIFICATION_CALL_BUTTON, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean getDimissedReadEnabled() {
|
||||||
|
return getBoolean(SettingsFragment.DISMISSED_READ, false);
|
||||||
|
}
|
||||||
|
|
||||||
public void putString(String key, String value) {
|
public void putString(String key, String value) {
|
||||||
mConversationPrefs.edit().putString(key, value).apply();
|
mConversationPrefs.edit().putString(key, value).apply();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -474,6 +474,7 @@ public class NotificationManager {
|
|||||||
.addAction(R.drawable.ic_accept, sRes.getString(R.string.read), readPI)
|
.addAction(R.drawable.ic_accept, sRes.getString(R.string.read), readPI)
|
||||||
.extend(WearableIntentReceiver.getSingleConversationExtender(context, message.mContact, message.mAddress, threadId))
|
.extend(WearableIntentReceiver.getSingleConversationExtender(context, message.mContact, message.mAddress, threadId))
|
||||||
.setDeleteIntent(seenPI);
|
.setDeleteIntent(seenPI);
|
||||||
|
if (conversationPrefs.getDimissedReadEnabled()){builder.setDeleteIntent(readPI);}
|
||||||
|
|
||||||
if (conversationPrefs.getCallButtonEnabled()) {
|
if (conversationPrefs.getCallButtonEnabled()) {
|
||||||
Intent callIntent = new Intent(Intent.ACTION_CALL);
|
Intent callIntent = new Intent(Intent.ACTION_CALL);
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ public class SettingsFragment extends PreferenceFragment implements
|
|||||||
public static final String MMS_CONTACT_SUPPORT = "pref_key_mms_contact_support";
|
public static final String MMS_CONTACT_SUPPORT = "pref_key_mms_contact_support";
|
||||||
public static final String SIMPLE_PREFS = "pref_key_simple";
|
public static final String SIMPLE_PREFS = "pref_key_simple";
|
||||||
public static final String DONATE = "pref_key_donate";
|
public static final String DONATE = "pref_key_donate";
|
||||||
|
public static final String DISMISSED_READ = "pref_key_dismiss_read";
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -207,6 +207,8 @@
|
|||||||
<string name="pref_vibration_summary">Vibrate when new messages are received</string>
|
<string name="pref_vibration_summary">Vibrate when new messages are received</string>
|
||||||
<string name="pref_notification_call">Call button</string>
|
<string name="pref_notification_call">Call button</string>
|
||||||
<string name="pref_notification_call_summary">Call the sender of a message right from the notification</string>
|
<string name="pref_notification_call_summary">Call the sender of a message right from the notification</string>
|
||||||
|
<string name="pref_dimiss_read">Mark as read</string>
|
||||||
|
<string name="pref_dismiss_read_summary">Mark as read when notification has been cleared</string>
|
||||||
|
|
||||||
<string name="pref_delayed">Delayed messaging</string>
|
<string name="pref_delayed">Delayed messaging</string>
|
||||||
<string name="pref_delayed_summary">Wait before sending your messages, so you have a chance to review them</string>
|
<string name="pref_delayed_summary">Wait before sending your messages, so you have a chance to review them</string>
|
||||||
|
|||||||
@@ -117,6 +117,9 @@
|
|||||||
<Preference
|
<Preference
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="pref_key_notification_call" />
|
android:key="pref_key_notification_call" />
|
||||||
|
<Preference
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:key="pref_key_dismiss_read" />
|
||||||
|
|
||||||
<!-- QKSMS+ -->
|
<!-- QKSMS+ -->
|
||||||
<Preference
|
<Preference
|
||||||
|
|||||||
@@ -71,5 +71,13 @@
|
|||||||
android:summary="@string/pref_notification_call_summary"
|
android:summary="@string/pref_notification_call_summary"
|
||||||
android:title="@string/pref_notification_call"
|
android:title="@string/pref_notification_call"
|
||||||
android:widgetLayout="@layout/view_checkbox" />
|
android:widgetLayout="@layout/view_checkbox" />
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:dependency="pref_key_notifications"
|
||||||
|
android:key="pref_key_dismiss_read"
|
||||||
|
android:layout="@layout/list_item_preference"
|
||||||
|
android:summary="@string/pref_dismiss_read_summary"
|
||||||
|
android:title="@string/pref_dimiss_read"
|
||||||
|
android:widgetLayout="@layout/view_checkbox" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
Reference in New Issue
Block a user