Skip to content

Commit

Permalink
Save uri to shared prefs after saving a form
Browse files Browse the repository at this point in the history
  • Loading branch information
grzesiek2010 committed May 25, 2023
1 parent 227adcd commit 4e515a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@
import org.odk.collect.permissions.PermissionsChecker;
import org.odk.collect.permissions.PermissionsProvider;
import org.odk.collect.settings.SettingsProvider;
import org.odk.collect.settings.keys.MetaKeys;
import org.odk.collect.settings.keys.ProjectKeys;
import org.odk.collect.shared.strings.Md5;
import org.odk.collect.strings.localization.LocalizedActivity;
Expand Down Expand Up @@ -2237,6 +2238,7 @@ private void finishAndReturnInstance() {
}

if (uri != null) {
settingsProvider.getMetaSettings().save(MetaKeys.LAST_SAVED_FORM_URI, uri.toString());
setResult(RESULT_OK, new Intent().setData(uri));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ object MetaKeys {
const val EXISTING_PROJECT_IMPORTED = "existing_project_imported"
const val LAST_LAUNCHED = "last_launched"
const val LAST_USED_PEN_COLOR = "last_used_pen_color"
const val LAST_SAVED_FORM_URI = "last_saved_form_uri"
}

0 comments on commit 4e515a5

Please sign in to comment.