mirror of
https://github.com/syncthing/syncthing-android.git
synced 2025-01-09 19:53:33 +00:00
* Add string: complete_welcome_wizard_first * Imported de translation * Fix "Share to Syncthing" when user didn't complete welcome wizard (fixes #354)
This commit is contained in:
parent
20e6a42ec0
commit
c8502ccbd7
3 changed files with 15 additions and 1 deletions
|
@ -29,6 +29,7 @@ import com.nutomic.syncthingandroid.model.Folder;
|
||||||
import com.nutomic.syncthingandroid.service.SyncthingService;
|
import com.nutomic.syncthingandroid.service.SyncthingService;
|
||||||
import com.nutomic.syncthingandroid.service.SyncthingServiceBinder;
|
import com.nutomic.syncthingandroid.service.SyncthingServiceBinder;
|
||||||
import com.nutomic.syncthingandroid.util.ConfigRouter;
|
import com.nutomic.syncthingandroid.util.ConfigRouter;
|
||||||
|
import com.nutomic.syncthingandroid.util.ConfigXml.OpenConfigException;
|
||||||
import com.nutomic.syncthingandroid.util.Util;
|
import com.nutomic.syncthingandroid.util.Util;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@ -76,7 +77,14 @@ public class ShareActivity extends SyncthingActivity
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onServiceStateChange(SyncthingService.State currentState) {
|
public void onServiceStateChange(SyncthingService.State currentState) {
|
||||||
List<Folder> folders = mConfig.getFolders(getApi());
|
List<Folder> folders = null;
|
||||||
|
try {
|
||||||
|
folders = mConfig.getFolders(getApi());
|
||||||
|
} catch (OpenConfigException e) {
|
||||||
|
Toast.makeText(this, getString(R.string.complete_welcome_wizard_first), Toast.LENGTH_LONG).show();
|
||||||
|
finish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Get the index of the previously selected folder.
|
// Get the index of the previously selected folder.
|
||||||
int folderIndex = 0;
|
int folderIndex = 0;
|
||||||
|
|
|
@ -703,6 +703,9 @@ Bitte melden Sie auftretende Probleme via GitHub.</string>
|
||||||
<!-- ShareActivity -->
|
<!-- ShareActivity -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Toast if user didn't complete the welcome wizard yet -->
|
||||||
|
<string name="complete_welcome_wizard_first">Starte zuerst die App aus der App-Übersicht und schließe den Willkommensassistenten ab, bevor Du Dateien teilst.</string>
|
||||||
|
|
||||||
<!-- Title of the "share" activity -->
|
<!-- Title of the "share" activity -->
|
||||||
<string name="share_activity_title">Speichern in Syncthing</string>
|
<string name="share_activity_title">Speichern in Syncthing</string>
|
||||||
|
|
||||||
|
|
|
@ -724,6 +724,9 @@ Please report any problems you encounter via Github.</string>
|
||||||
<!-- ShareActivity -->
|
<!-- ShareActivity -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Toast if user didn't complete the welcome wizard yet -->
|
||||||
|
<string name="complete_welcome_wizard_first">First, launch the app from the app drawer and complete the welcome wizard before sharing files.</string>
|
||||||
|
|
||||||
<!-- Title of the "share" activity -->
|
<!-- Title of the "share" activity -->
|
||||||
<string name="share_activity_title">Save to Syncthing</string>
|
<string name="share_activity_title">Save to Syncthing</string>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue