mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-02 17:43:06 +02:00
Rename sync now to refresh
This commit is contained in:
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
@@ -27,9 +27,9 @@ limitations under the License.
|
||||
android:showAsAction="ifRoom"
|
||||
android:title="@string/menu_start_gps"/>
|
||||
<item
|
||||
android:icon="@drawable/menu_sync_now"
|
||||
android:id="@+id/track_list_sync_now"
|
||||
android:title="@string/menu_sync_now"/>
|
||||
android:icon="@drawable/menu_refresh"
|
||||
android:id="@+id/track_list_refresh"
|
||||
android:title="@string/menu_refresh"/>
|
||||
<item
|
||||
android:icon="@drawable/menu_aggregated_statistics"
|
||||
android:id="@+id/track_list_aggregated_statistics"
|
||||
|
||||
@@ -1129,6 +1129,12 @@ limitations under the License.
|
||||
Character limit: ~20 (1 line)">
|
||||
Play
|
||||
</string>
|
||||
<string name="menu_refresh"
|
||||
translation_description="In the menu, to refresh with Google Drive.
|
||||
|
||||
Character limit: ~20 (1 line)">
|
||||
Refresh
|
||||
</string>
|
||||
<string name="menu_satellite"
|
||||
translation_description="In the menu, under the map layer option, the submenu to display
|
||||
satellite.
|
||||
@@ -1192,12 +1198,6 @@ limitations under the License.
|
||||
Character limit: ~20 (1 line)">
|
||||
Stop GPS
|
||||
</string>
|
||||
<string name="menu_sync_now"
|
||||
translation_description="In the menu, to sync now with Google Drive.
|
||||
|
||||
Character limit: ~20 (1 line)">
|
||||
Sync now
|
||||
</string>
|
||||
<string name="menu_terrain"
|
||||
translation_description="In the menu, under the map layer option, the submenu to display
|
||||
terrain.
|
||||
|
||||
@@ -284,7 +284,7 @@ public class TrackListActivity extends AbstractSendToGoogleActivity
|
||||
private MenuItem importAllMenuItem;
|
||||
private MenuItem exportAllMenuItem;
|
||||
private MenuItem deleteAllMenuItem;
|
||||
private MenuItem syncNowMenuItem;
|
||||
private MenuItem refreshMenuItem;
|
||||
private MenuItem feedbackMenuItem;
|
||||
|
||||
private boolean startGps = false; // true to start gps
|
||||
@@ -460,7 +460,7 @@ public class TrackListActivity extends AbstractSendToGoogleActivity
|
||||
importAllMenuItem = menu.findItem(R.id.track_list_import_all);
|
||||
exportAllMenuItem = menu.findItem(R.id.track_list_export_all);
|
||||
deleteAllMenuItem = menu.findItem(R.id.track_list_delete_all);
|
||||
syncNowMenuItem = menu.findItem(R.id.track_list_sync_now);
|
||||
refreshMenuItem = menu.findItem(R.id.track_list_refresh);
|
||||
feedbackMenuItem = menu.findItem(R.id.track_list_feedback);
|
||||
feedbackMenuItem.setVisible(ApiAdapterFactory.getApiAdapter().isGoogleFeedbackAvailable());
|
||||
|
||||
@@ -539,7 +539,7 @@ public class TrackListActivity extends AbstractSendToGoogleActivity
|
||||
intent = IntentUtils.newIntent(this, AggregatedStatsActivity.class);
|
||||
startActivity(intent);
|
||||
return true;
|
||||
case R.id.track_list_sync_now:
|
||||
case R.id.track_list_refresh:
|
||||
SyncUtils.syncNow(this);
|
||||
return true;
|
||||
case R.id.track_list_settings:
|
||||
@@ -724,8 +724,8 @@ public class TrackListActivity extends AbstractSendToGoogleActivity
|
||||
if (deleteAllMenuItem != null) {
|
||||
deleteAllMenuItem.setVisible(!isRecording);
|
||||
}
|
||||
if (syncNowMenuItem != null) {
|
||||
syncNowMenuItem.setVisible(driveSync);
|
||||
if (refreshMenuItem != null) {
|
||||
refreshMenuItem.setVisible(driveSync);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -457,7 +457,7 @@ public class SettingTest extends ActivityInstrumentationTestCase2<TrackListActiv
|
||||
EndToEndTestUtils.SOLO.goBack();
|
||||
EndToEndTestUtils.SOLO.goBack();
|
||||
assertEquals(isSyncChecked,
|
||||
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_sync_now), false));
|
||||
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_refresh), false));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -121,7 +121,7 @@ public class ShareTest extends ActivityInstrumentationTestCase2<TrackListActivit
|
||||
EndToEndTestUtils.SOLO.goBack();
|
||||
SyncTestUtils.enableSync(GoogleUtils.ACCOUNT_NAME_2);
|
||||
EndToEndTestUtils.findMenuItem(
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
||||
|
||||
assertTrue(EndToEndTestUtils.SOLO.waitForText(
|
||||
activityMyTracks.getString(R.string.track_list_shared_with_me), 1,
|
||||
|
||||
+4
-4
@@ -78,14 +78,14 @@ public class MultiAccountsSyncTest extends ActivityInstrumentationTestCase2<Trac
|
||||
|
||||
// Sync with Google Drive and then check it of the second account.
|
||||
EndToEndTestUtils.findMenuItem(
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
||||
drive = SyncTestUtils.getGoogleDrive(trackListActivity.getApplicationContext());
|
||||
SyncTestUtils.checkFilesNumber(drive);
|
||||
|
||||
// Check Google Drive of the first account.
|
||||
SyncTestUtils.enableSync(GoogleUtils.ACCOUNT_NAME_1);
|
||||
EndToEndTestUtils.findMenuItem(
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
||||
drive = SyncTestUtils.getGoogleDrive(trackListActivity.getApplicationContext());
|
||||
SyncTestUtils.checkFilesNumber(drive);
|
||||
|
||||
@@ -136,14 +136,14 @@ public class MultiAccountsSyncTest extends ActivityInstrumentationTestCase2<Trac
|
||||
// Check Google Drive of the first account.
|
||||
SyncTestUtils.enableSync(GoogleUtils.ACCOUNT_NAME_1);
|
||||
EndToEndTestUtils.findMenuItem(
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
||||
drive = SyncTestUtils.getGoogleDrive(trackListActivity.getApplicationContext());
|
||||
SyncTestUtils.checkFilesNumber(drive);
|
||||
|
||||
// Check Google Drive of the second account.
|
||||
SyncTestUtils.enableSync(GoogleUtils.ACCOUNT_NAME_2);
|
||||
EndToEndTestUtils.findMenuItem(
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
||||
drive = SyncTestUtils.getGoogleDrive(trackListActivity.getApplicationContext());
|
||||
SyncTestUtils.checkFilesNumber(drive);
|
||||
}
|
||||
|
||||
+5
-5
@@ -61,7 +61,7 @@ public class SyncDriveWithMyTracksTest extends ActivityInstrumentationTestCase2<
|
||||
return;
|
||||
}
|
||||
EndToEndTestUtils.findMenuItem(
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
||||
SyncTestUtils.checkFilesNumber(drive);
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ public class SyncDriveWithMyTracksTest extends ActivityInstrumentationTestCase2<
|
||||
EndToEndTestUtils.SOLO.clickOnText(EndToEndTestUtils.activityMytracks
|
||||
.getString(R.string.generic_yes));
|
||||
EndToEndTestUtils.findMenuItem(
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
||||
SyncTestUtils.checkFile(EndToEndTestUtils.trackName, false, drive);
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ public class SyncDriveWithMyTracksTest extends ActivityInstrumentationTestCase2<
|
||||
EndToEndTestUtils.createSimpleTrack(0, true);
|
||||
EndToEndTestUtils.createSimpleTrack(3, true);
|
||||
EndToEndTestUtils.findMenuItem(
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
||||
SyncTestUtils.checkFilesNumber(drive);
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ public class SyncDriveWithMyTracksTest extends ActivityInstrumentationTestCase2<
|
||||
|
||||
// Sync this track.
|
||||
EndToEndTestUtils.findMenuItem(
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
||||
SyncTestUtils.checkFile(EndToEndTestUtils.trackName, true, drive);
|
||||
String oldTrack = SyncTestUtils.getContentOfFile(
|
||||
SyncTestUtils.getFile(EndToEndTestUtils.trackName, drive), drive);
|
||||
@@ -140,7 +140,7 @@ public class SyncDriveWithMyTracksTest extends ActivityInstrumentationTestCase2<
|
||||
|
||||
// Sync again.
|
||||
EndToEndTestUtils.findMenuItem(
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
||||
|
||||
// Check.
|
||||
SyncTestUtils.checkFile(oldTrackName, false, drive);
|
||||
|
||||
+6
-6
@@ -62,12 +62,12 @@ public class SyncMyTracksWithDriveTest extends ActivityInstrumentationTestCase2<
|
||||
}
|
||||
EndToEndTestUtils.createTrackIfEmpty(0, true);
|
||||
EndToEndTestUtils.findMenuItem(
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
||||
SyncTestUtils.checkFilesNumber(drive);
|
||||
|
||||
SyncTestUtils.removeKMLFiles(drive);
|
||||
EndToEndTestUtils.findMenuItem(
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
||||
SyncTestUtils.checkTracksNumber(0);
|
||||
}
|
||||
|
||||
@@ -84,14 +84,14 @@ public class SyncMyTracksWithDriveTest extends ActivityInstrumentationTestCase2<
|
||||
EndToEndTestUtils.createSimpleTrack(0, true);
|
||||
EndToEndTestUtils.createSimpleTrack(0, true);
|
||||
EndToEndTestUtils.findMenuItem(
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
||||
SyncTestUtils.checkFilesNumber(drive);
|
||||
|
||||
// Remove one track from Google Drive
|
||||
File file = SyncTestUtils.getFile(EndToEndTestUtils.trackName, drive);
|
||||
SyncTestUtils.removeFile(file, drive);
|
||||
EndToEndTestUtils.findMenuItem(
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
||||
SyncTestUtils.checkFilesNumber(drive);
|
||||
SyncTestUtils.checkTracksNumber(1);
|
||||
}
|
||||
@@ -109,7 +109,7 @@ public class SyncMyTracksWithDriveTest extends ActivityInstrumentationTestCase2<
|
||||
EndToEndTestUtils.createSimpleTrack(0, true);
|
||||
EndToEndTestUtils.createSimpleTrack(0, true);
|
||||
EndToEndTestUtils.findMenuItem(
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
||||
instrumentation.waitForIdleSync();
|
||||
SyncTestUtils.checkFilesNumber(drive);
|
||||
File folder = SyncUtils.getMyTracksFolder(trackListActivity.getApplicationContext(), drive);
|
||||
@@ -117,7 +117,7 @@ public class SyncMyTracksWithDriveTest extends ActivityInstrumentationTestCase2<
|
||||
|
||||
SyncTestUtils.removeFile(folder, drive);
|
||||
EndToEndTestUtils.findMenuItem(
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
||||
SyncTestUtils.checkFilesNumber(drive);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -230,7 +230,7 @@ public class SyncTestUtils {
|
||||
try {
|
||||
EndToEndTestUtils.sleep(EndToEndTestUtils.SHORT_WAIT_TIME);
|
||||
EndToEndTestUtils.findMenuItem(
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_sync_now), true);
|
||||
EndToEndTestUtils.activityMytracks.getString(R.string.menu_refresh), true);
|
||||
int trackNumber = EndToEndTestUtils.SOLO.getCurrentViews(ListView.class).get(0).getCount();
|
||||
List<File> files = getDriveFiles(
|
||||
EndToEndTestUtils.activityMytracks.getApplicationContext(), drive);
|
||||
|
||||
Reference in New Issue
Block a user