forked from upstream-mirrors/OpenTracks
Improve delete all dialog message
This commit is contained in:
@@ -2173,10 +2173,17 @@ limitations under the License.
|
|||||||
</string>
|
</string>
|
||||||
|
|
||||||
<!-- Track Delete -->
|
<!-- Track Delete -->
|
||||||
<string name="track_delete_all_confirm_message"
|
<string name="track_delete_all_confirm_message_sync_off"
|
||||||
translation_description="When deleting all the tracks, the confirmation message.">
|
translation_description="When deleting all the tracks, the confirmation message when sync to
|
||||||
|
Google Drive is off.">
|
||||||
|
All tracks and markers will be permanently deleted from the device. Exported tracks on Google
|
||||||
|
Drive and external storage will not be deleted.
|
||||||
|
</string>
|
||||||
|
<string name="track_delete_all_confirm_message_sync_on"
|
||||||
|
translation_description="When deleting all the tracks, the confirmation message when sync to
|
||||||
|
Google Drive is on.">
|
||||||
All tracks and markers will be permanently deleted from the device. Google Drive sync will be
|
All tracks and markers will be permanently deleted from the device. Google Drive sync will be
|
||||||
turned off. No tracks will be deleted on Google Drive.
|
turned off. Exported tracks on Google Drive and external storage will not be deleted.
|
||||||
</string>
|
</string>
|
||||||
<string name="track_delete_one_confirm_message"
|
<string name="track_delete_one_confirm_message"
|
||||||
translation_description="When deleting one track, the confirmation message.">
|
translation_description="When deleting one track, the confirmation message.">
|
||||||
|
|||||||
+5
-1
@@ -17,6 +17,7 @@
|
|||||||
package com.google.android.apps.mytracks.fragments;
|
package com.google.android.apps.mytracks.fragments;
|
||||||
|
|
||||||
import com.google.android.apps.mytracks.util.DialogUtils;
|
import com.google.android.apps.mytracks.util.DialogUtils;
|
||||||
|
import com.google.android.apps.mytracks.util.PreferencesUtils;
|
||||||
import com.google.android.maps.mytracks.R;
|
import com.google.android.maps.mytracks.R;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
@@ -84,8 +85,11 @@ public class ConfirmDeleteDialogFragment extends AbstractMyTracksDialogFragment
|
|||||||
int titleId;
|
int titleId;
|
||||||
int messageId;
|
int messageId;
|
||||||
if (trackIds.length == 1 && trackIds[0] == -1L) {
|
if (trackIds.length == 1 && trackIds[0] == -1L) {
|
||||||
|
boolean driveSync = PreferencesUtils.getBoolean(
|
||||||
|
getActivity(), R.string.drive_sync_key, PreferencesUtils.DRIVE_SYNC_DEFAULT);
|
||||||
titleId = R.string.generic_delete_all_confirm_title;
|
titleId = R.string.generic_delete_all_confirm_title;
|
||||||
messageId = R.string.track_delete_all_confirm_message;
|
messageId = driveSync ? R.string.track_delete_all_confirm_message_sync_on
|
||||||
|
: R.string.track_delete_all_confirm_message_sync_off;
|
||||||
} else {
|
} else {
|
||||||
titleId = trackIds.length > 1 ? R.string.generic_delete_selected_confirm_title
|
titleId = trackIds.length > 1 ? R.string.generic_delete_selected_confirm_title
|
||||||
: R.string.track_delete_one_confirm_title;
|
: R.string.track_delete_one_confirm_title;
|
||||||
|
|||||||
Reference in New Issue
Block a user