slightly change wording of sync_with_contacts_long

This commit is contained in:
Daniel Gultsch 2021-02-11 18:55:27 +01:00
parent b808a03702
commit 9f869d3895
2 changed files with 1132 additions and 1122 deletions

View file

@ -285,7 +285,7 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
this.mHideOfflineContacts = QuickConversationsService.isConversations() && preferences.getBoolean("hide_offline", false);
final boolean startSearching = preferences.getBoolean("start_searching",getResources().getBoolean(R.bool.start_searching));
final boolean startSearching = preferences.getBoolean("start_searching", getResources().getBoolean(R.bool.start_searching));
final Intent intent;
if (savedInstanceState == null) {
@ -306,8 +306,8 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
} else if (startSearching && mInitialSearchValue.peek() == null) {
mInitialSearchValue.push("");
}
mRequestedContactsPermission.set(savedInstanceState != null && savedInstanceState.getBoolean("requested_contacts_permission",false));
mOpenedFab.set(savedInstanceState != null && savedInstanceState.getBoolean("opened_fab",false));
mRequestedContactsPermission.set(savedInstanceState != null && savedInstanceState.getBoolean("requested_contacts_permission", false));
mOpenedFab.set(savedInstanceState != null && savedInstanceState.getBoolean("opened_fab", false));
binding.speedDial.setOnActionSelectedListener(actionItem -> {
final String searchString = mSearchEditText != null ? mSearchEditText.getText().toString() : null;
final String prefilled;
@ -330,7 +330,7 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
showPublicChannelDialog();
break;
case R.id.create_contact:
showCreateContactDialog(prefilled,null);
showCreateContactDialog(prefilled, null);
break;
}
return false;
@ -350,9 +350,9 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
public void onSaveInstanceState(Bundle savedInstanceState) {
Intent pendingIntent = pendingViewIntent.peek();
savedInstanceState.putParcelable("intent", pendingIntent != null ? pendingIntent : getIntent());
savedInstanceState.putBoolean("requested_contacts_permission",mRequestedContactsPermission.get());
savedInstanceState.putBoolean("opened_fab",mOpenedFab.get());
savedInstanceState.putBoolean("created_by_view_intent",createdByViewIntent);
savedInstanceState.putBoolean("requested_contacts_permission", mRequestedContactsPermission.get());
savedInstanceState.putBoolean("opened_fab", mOpenedFab.get());
savedInstanceState.putBoolean("created_by_view_intent", createdByViewIntent);
if (mMenuSearchView != null && mMenuSearchView.isActionViewExpanded()) {
savedInstanceState.putString("search", mSearchEditText != null ? mSearchEditText.getText().toString() : null);
}
@ -447,7 +447,7 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
protected void showQrForContact() {
int position = contact_context_id;
Contact contact = (Contact) contacts.get(position);
showQrCode("xmpp:"+contact.getJid().asBareJid().toEscapedString());
showQrCode("xmpp:" + contact.getJid().asBareJid().toEscapedString());
}
protected void toggleContactBlock() {
@ -732,17 +732,27 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
if (checkSelfPermission(Manifest.permission.READ_CONTACTS) != PackageManager.PERMISSION_GRANTED) {
if (mRequestedContactsPermission.compareAndSet(false, true)) {
if (shouldShowRequestPermissionRationale(Manifest.permission.READ_CONTACTS)) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
final AlertDialog.Builder builder = new AlertDialog.Builder(this);
final AtomicBoolean requestPermission = new AtomicBoolean(false);
builder.setTitle(R.string.sync_with_contacts);
if (QuickConversationsService.isQuicksy()) {
builder.setMessage(Html.fromHtml(getString(R.string.sync_with_contacts_quicksy)));
} else {
builder.setMessage(getString(R.string.sync_with_contacts_long, getString(R.string.app_name)));
}
builder.setPositiveButton(R.string.next, (dialog, which) -> requestPermissions(new String[]{Manifest.permission.READ_CONTACTS}, REQUEST_SYNC_CONTACTS));
builder.setOnDismissListener(dialog -> requestPermissions(new String[]{Manifest.permission.READ_CONTACTS}, REQUEST_SYNC_CONTACTS));
builder.setPositiveButton(R.string.next, (dialog, which) -> {
if (requestPermission.compareAndSet(false, true)) {
requestPermissions(new String[]{Manifest.permission.READ_CONTACTS}, REQUEST_SYNC_CONTACTS);
}
});
builder.setOnDismissListener(dialog -> {
if (requestPermission.compareAndSet(false, true)) {
requestPermissions(new String[]{Manifest.permission.READ_CONTACTS}, REQUEST_SYNC_CONTACTS);
}
});
builder.setCancelable(false);
AlertDialog dialog = builder.create();
final AlertDialog dialog = builder.create();
dialog.setCanceledOnTouchOutside(false);
dialog.setOnShowListener(dialogInterface -> {
final TextView tv = dialog.findViewById(android.R.id.message);
@ -816,7 +826,7 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
if (QuickConversationsService.isQuicksy()) {
setRefreshing(xmppConnectionService.getQuickConversationsService().isSynchronizing());
}
if (QuickConversationsService.isConversations() && AccountUtils.hasEnabledAccounts(xmppConnectionService) && this.contacts.size() == 0 && this.conferences.size() == 0 && mOpenedFab.compareAndSet(false,true)) {
if (QuickConversationsService.isConversations() && AccountUtils.hasEnabledAccounts(xmppConnectionService) && this.contacts.size() == 0 && this.conferences.size() == 0 && mOpenedFab.compareAndSet(false, true)) {
binding.speedDial.open();
}
}
@ -1068,7 +1078,7 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
@Override
public void onRefresh() {
Log.d(Config.LOGTAG,"user requested to refresh");
Log.d(Config.LOGTAG, "user requested to refresh");
if (QuickConversationsService.isQuicksy() && xmppConnectionService != null) {
xmppConnectionService.getQuickConversationsService().considerSyncBackground(true);
}

View file

@ -507,7 +507,7 @@
<string name="no_storage_permission">Grant %1$s access to external storage</string>
<string name="no_camera_permission">Grant %1$s access to the camera</string>
<string name="sync_with_contacts">Synchronize with contacts</string>
<string name="sync_with_contacts_long">%1$s wants permission to access your contacts to match your XMPP contact list with your contacts to show their full names and avatars.\n\nIt will only read your contacts and match them locally without uploading them to your server.</string>
<string name="sync_with_contacts_long">%1$s wants permission to access your address book to match it with your XMPP contact list.\nThis will display your contacts full names and avatars.\n\n%1$s will only read your address book and match it locally without uploading anything to your server.</string>
<string name="sync_with_contacts_quicksy"><![CDATA[Quicksy needs access to your contacts phone numbers to make suggestions about possible contacts who are already on Quicksy.<br><br>We will not store a copy of those phone numbers.\n\nFor more information read our <a href="https://quicksy.im/#privacy">privacy policy</a>.<br><br>You will now be asked to grant permission to access your contacts.]]></string>
<string name="notify_on_all_messages">Notify on all messages</string>
<string name="notify_only_when_highlighted">Notify only when mentioned</string>