mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-09 08:18:34 +00:00
Add storage force push internal option.
This commit is contained in:
parent
eb6ecc59ab
commit
d70999c386
@ -14,6 +14,7 @@ import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
|
|||||||
import org.thoughtcrime.securesms.jobs.RefreshAttributesJob;
|
import org.thoughtcrime.securesms.jobs.RefreshAttributesJob;
|
||||||
import org.thoughtcrime.securesms.jobs.RefreshOwnProfileJob;
|
import org.thoughtcrime.securesms.jobs.RefreshOwnProfileJob;
|
||||||
import org.thoughtcrime.securesms.jobs.RotateProfileKeyJob;
|
import org.thoughtcrime.securesms.jobs.RotateProfileKeyJob;
|
||||||
|
import org.thoughtcrime.securesms.jobs.StorageForcePushJob;
|
||||||
import org.thoughtcrime.securesms.keyvalue.InternalValues;
|
import org.thoughtcrime.securesms.keyvalue.InternalValues;
|
||||||
import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
||||||
import org.thoughtcrime.securesms.logging.Log;
|
import org.thoughtcrime.securesms.logging.Log;
|
||||||
@ -50,6 +51,12 @@ public class InternalOptionsPreferenceFragment extends CorrectedPreferenceFragme
|
|||||||
Toast.makeText(getContext(), "Scheduled profile key rotation", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), "Scheduled profile key rotation", Toast.LENGTH_SHORT).show();
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
findPreference("pref_force_send").setOnPreferenceClickListener(preference -> {
|
||||||
|
ApplicationDependencies.getJobManager().add(new StorageForcePushJob());
|
||||||
|
Toast.makeText(getContext(), "Scheduled storage force push", Toast.LENGTH_SHORT).show();
|
||||||
|
return true;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initializeSwitchPreference(@NonNull PreferenceDataStore preferenceDataStore,
|
private void initializeSwitchPreference(@NonNull PreferenceDataStore preferenceDataStore,
|
||||||
|
@ -1974,6 +1974,9 @@
|
|||||||
<string name="preferences__internal_refresh_attributes_description" translatable="false">Forces a write of capabilities on to the server followed by a read.</string>
|
<string name="preferences__internal_refresh_attributes_description" translatable="false">Forces a write of capabilities on to the server followed by a read.</string>
|
||||||
<string name="preferences__internal_rotate_profile_key" translatable="false">Rotate profile key</string>
|
<string name="preferences__internal_rotate_profile_key" translatable="false">Rotate profile key</string>
|
||||||
<string name="preferences__internal_rotate_profile_key_description" translatable="false">Creates a new versioned profile, and triggers an update of any GV2 group you belong to.</string>
|
<string name="preferences__internal_rotate_profile_key_description" translatable="false">Creates a new versioned profile, and triggers an update of any GV2 group you belong to.</string>
|
||||||
|
<string name="preferences__internal_storage_service" translatable="false">Storage service</string>
|
||||||
|
<string name="preferences__internal_force_storage_service_sync" translatable="false">Overwrite remote data</string>
|
||||||
|
<string name="preferences__internal_force_storage_service_sync_description" translatable="false">Forces remote storage to match the local device state.</string>
|
||||||
|
|
||||||
<!-- **************************************** -->
|
<!-- **************************************** -->
|
||||||
<!-- menus -->
|
<!-- menus -->
|
||||||
|
@ -14,6 +14,16 @@
|
|||||||
android:key="pref_rotate_profile_key"
|
android:key="pref_rotate_profile_key"
|
||||||
android:summary="@string/preferences__internal_rotate_profile_key_description"
|
android:summary="@string/preferences__internal_rotate_profile_key_description"
|
||||||
android:title="@string/preferences__internal_rotate_profile_key" />
|
android:title="@string/preferences__internal_rotate_profile_key" />
|
||||||
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
<PreferenceCategory
|
||||||
|
android:key="internal_storage"
|
||||||
|
android:title="@string/preferences__internal_storage_service">
|
||||||
|
|
||||||
|
<Preference
|
||||||
|
android:key="pref_force_send"
|
||||||
|
android:summary="@string/preferences__internal_force_storage_service_sync_description"
|
||||||
|
android:title="@string/preferences__internal_force_storage_service_sync" />
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user