mirror of
https://github.com/ankidroid/Anki-Android.git
synced 2024-09-20 12:02:16 +02:00
Merged '5178456' from release-2.5: 1fef6d4,17be96c
Commit '1fef6d4' Don't clear undo unless a new deck has been selected Commit '17be96c' Add subsection headers to general preferences
This commit is contained in:
commit
fbf2eb5e75
@ -1627,8 +1627,6 @@ public class DeckPicker extends NavigationDrawerActivity implements
|
||||
|
||||
|
||||
private void openStudyOptions(boolean withDeckOptions) {
|
||||
// Clear the undo history when selecting a new deck
|
||||
getCol().clearUndo();
|
||||
mCongratulationsShown = false;
|
||||
if (mFragmented) {
|
||||
// The fragment will show the study options screen instead of launching a new activity.
|
||||
@ -1645,6 +1643,10 @@ public class DeckPicker extends NavigationDrawerActivity implements
|
||||
private void handleDeckSelection(long did) {
|
||||
// Forget what the last used deck was in the browser
|
||||
CardBrowser.clearSelectedDeck();
|
||||
// Clear the undo history when selecting a new deck
|
||||
if (getCol().getDecks().selected() != did) {
|
||||
getCol().clearUndo();
|
||||
}
|
||||
// Select the deck
|
||||
getCol().getDecks().select(did);
|
||||
// Reset the schedule so that we get the counts for the currently selected deck
|
||||
@ -1977,8 +1979,6 @@ public class DeckPicker extends NavigationDrawerActivity implements
|
||||
|
||||
|
||||
private void openReviewer() {
|
||||
// Clear the undo history when selecting a new deck
|
||||
getCol().clearUndo();
|
||||
mCongratulationsShown = false;
|
||||
Intent reviewer = new Intent(this, Reviewer.class);
|
||||
startActivityForResultWithAnimation(reviewer, REQUEST_REVIEW, ActivityTransitionAnimation.LEFT);
|
||||
|
@ -24,43 +24,47 @@
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:title="@string/pref_cat_general"
|
||||
android:summary="@string/pref_cat_general_summ" >
|
||||
<Preference
|
||||
android:dialogTitle="@string/sync_account"
|
||||
android:key="syncAccount"
|
||||
android:summary="@string/sync_account_summ_logged_out"
|
||||
android:title="@string/sync_account" >
|
||||
<intent
|
||||
android:targetClass="com.ichi2.anki.MyAccount"
|
||||
android:targetPackage="com.ichi2.anki" />
|
||||
</Preference>
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:key="syncFetchesMedia"
|
||||
android:summary="@string/sync_fetch_missing_media_summ"
|
||||
android:title="@string/sync_fetch_missing_media" />
|
||||
<ListPreference
|
||||
android:defaultValue=""
|
||||
android:entries="@array/add_to_cur_labels"
|
||||
android:entryValues="@array/add_to_cur_values"
|
||||
android:key="useCurrent"
|
||||
android:summary=""
|
||||
android:title="@string/use_current" />
|
||||
<ListPreference
|
||||
android:defaultValue=""
|
||||
android:key="language"
|
||||
android:summary="@string/preference_summary_literal"
|
||||
android:title="@string/language" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="automaticSyncMode"
|
||||
android:summary="@string/automatic_sync_choice_summ"
|
||||
android:title="@string/automatic_sync_choice" />
|
||||
<ListPreference
|
||||
android:defaultValue="2"
|
||||
android:entries="@array/error_reporting_choice_labels"
|
||||
android:entryValues="@array/error_reporting_choice_values"
|
||||
android:key="reportErrorMode"
|
||||
android:title="@string/error_reporting_choice" />
|
||||
<PreferenceCategory android:title="@string/button_sync" >
|
||||
<Preference
|
||||
android:dialogTitle="@string/sync_account"
|
||||
android:key="syncAccount"
|
||||
android:summary="@string/sync_account_summ_logged_out"
|
||||
android:title="@string/sync_account" >
|
||||
<intent
|
||||
android:targetClass="com.ichi2.anki.MyAccount"
|
||||
android:targetPackage="com.ichi2.anki" />
|
||||
</Preference>
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:key="syncFetchesMedia"
|
||||
android:summary="@string/sync_fetch_missing_media_summ"
|
||||
android:title="@string/sync_fetch_missing_media" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="automaticSyncMode"
|
||||
android:summary="@string/automatic_sync_choice_summ"
|
||||
android:title="@string/automatic_sync_choice" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/pref_cat_general">
|
||||
<ListPreference
|
||||
android:defaultValue=""
|
||||
android:entries="@array/add_to_cur_labels"
|
||||
android:entryValues="@array/add_to_cur_values"
|
||||
android:key="useCurrent"
|
||||
android:summary=""
|
||||
android:title="@string/use_current" />
|
||||
<ListPreference
|
||||
android:defaultValue=""
|
||||
android:key="language"
|
||||
android:summary="@string/preference_summary_literal"
|
||||
android:title="@string/language" />
|
||||
<ListPreference
|
||||
android:defaultValue="2"
|
||||
android:entries="@array/error_reporting_choice_labels"
|
||||
android:entryValues="@array/error_reporting_choice_values"
|
||||
android:key="reportErrorMode"
|
||||
android:title="@string/error_reporting_choice" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/notification_pref" >
|
||||
<ListPreference
|
||||
android:defaultValue="1000000"
|
||||
|
Loading…
Reference in New Issue
Block a user