mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Merge branch 'main' into wch423/mark-external-links
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
* Truncate file names in the middle, not at the end; important information are more often at the end
|
||||
* Remove email address from user profile
|
||||
* Mark external links with " ↗" to make them clear
|
||||
* Make QR code larger on "Add Second Device" screen
|
||||
* Fix: Show dialog if pasted QR codes are invalid
|
||||
* Update to core 2.36.0
|
||||
|
||||
|
||||
+1
-1
@@ -1927,7 +1927,7 @@ JNIEXPORT jstring Java_com_b44t_messenger_DcBackupProvider_getQr(JNIEnv *env, jo
|
||||
|
||||
JNIEXPORT jstring Java_com_b44t_messenger_DcBackupProvider_getQrSvg(JNIEnv *env, jobject obj)
|
||||
{
|
||||
char* temp = dc_backup_provider_get_qr_svg(get_dc_backup_provider(env, obj));
|
||||
char* temp = dc_create_qr_svg(dc_backup_provider_get_qr(get_dc_backup_provider(env, obj)));
|
||||
jstring ret = JSTRING_NEW(temp);
|
||||
dc_str_unref(temp);
|
||||
return ret;
|
||||
|
||||
@@ -35,6 +35,7 @@ import org.thoughtcrime.securesms.qr.QrCodeHandler;
|
||||
import org.thoughtcrime.securesms.qr.RegistrationQrActivity;
|
||||
import org.thoughtcrime.securesms.service.GenericForegroundService;
|
||||
import org.thoughtcrime.securesms.service.NotificationController;
|
||||
import org.thoughtcrime.securesms.util.Prefs;
|
||||
import org.thoughtcrime.securesms.util.StorageUtil;
|
||||
import org.thoughtcrime.securesms.util.StreamUtil;
|
||||
import org.thoughtcrime.securesms.util.Util;
|
||||
@@ -76,8 +77,7 @@ public class WelcomeActivity extends BaseActionBarActivity implements DcEventCen
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.create();
|
||||
view.findViewById(R.id.add_as_second_device_button).setOnClickListener((v) -> {
|
||||
startAddAsSecondDeviceActivity();
|
||||
signInDialog.dismiss();
|
||||
showSignInDialogWithPermission(signInDialog);
|
||||
});
|
||||
view.findViewById(R.id.backup_button).setOnClickListener((v) -> {
|
||||
startImportBackup();
|
||||
@@ -93,6 +93,28 @@ public class WelcomeActivity extends BaseActionBarActivity implements DcEventCen
|
||||
DcHelper.maybeShowMigrationError(this);
|
||||
}
|
||||
|
||||
private void showSignInDialogWithPermission(AlertDialog signInDialog) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU
|
||||
&& !Prefs.getBooleanPreference(this, Prefs.ASKED_FOR_NOTIFICATION_PERMISSION, false)) {
|
||||
Prefs.setBooleanPreference(this, Prefs.ASKED_FOR_NOTIFICATION_PERMISSION, true);
|
||||
Permissions.with(this)
|
||||
.request(Manifest.permission.POST_NOTIFICATIONS)
|
||||
.ifNecessary()
|
||||
.onAllGranted(() -> {
|
||||
startAddAsSecondDeviceActivity();
|
||||
signInDialog.dismiss();
|
||||
})
|
||||
.onAnyDenied(() -> {
|
||||
startAddAsSecondDeviceActivity();
|
||||
signInDialog.dismiss();
|
||||
})
|
||||
.execute();
|
||||
} else {
|
||||
startAddAsSecondDeviceActivity();
|
||||
signInDialog.dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
protected void initializeActionBar() {
|
||||
ActionBar supportActionBar = getSupportActionBar();
|
||||
if (supportActionBar == null) throw new AssertionError();
|
||||
|
||||
Reference in New Issue
Block a user