mirror of
https://github.com/etesync/android
synced 2025-02-13 08:02:03 +00:00
Create collection: only update url after pushed to server.
Without this change, if the putting on server of a new collection fails, the url would already be updated, and since having a url indicates it exists on the server, trying to save it later would result in a 404.
This commit is contained in:
parent
32df64000f
commit
f84bd386f1
@ -153,8 +153,8 @@ public class CreateCollectionFragment extends DialogFragment implements LoaderMa
|
|||||||
if (info.url == null) {
|
if (info.url == null) {
|
||||||
// CollectionInfo doesn't have a url at this point, update it.
|
// CollectionInfo doesn't have a url at this point, update it.
|
||||||
JournalManager.Journal journal = new JournalManager.Journal(settings.password(), info.toJson());
|
JournalManager.Journal journal = new JournalManager.Journal(settings.password(), info.toJson());
|
||||||
info.url = journal.getUuid();
|
|
||||||
journalManager.putJournal(journal);
|
journalManager.putJournal(journal);
|
||||||
|
info.url = journal.getUuid();
|
||||||
} else {
|
} else {
|
||||||
JournalManager.Journal journal = new JournalManager.Journal(settings.password(), info.toJson(), info.url);
|
JournalManager.Journal journal = new JournalManager.Journal(settings.password(), info.toJson(), info.url);
|
||||||
journalManager.updateJournal(journal);
|
journalManager.updateJournal(journal);
|
||||||
|
Loading…
Reference in New Issue
Block a user