mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 302663055c | |||
| aafa3e13fe | |||
| d9cb575e68 | |||
| cff35c5380 |
@@ -70,6 +70,8 @@ public class EditRelayActivity extends BaseActionBarActivity
|
||||
|
||||
private Group advancedGroup;
|
||||
private ImageView advancedIcon;
|
||||
private View imapFolderLayout;
|
||||
private boolean imapFolderHasValue = false;
|
||||
private ProgressDialog progressDialog;
|
||||
private boolean cancelled = false;
|
||||
|
||||
@@ -102,9 +104,11 @@ public class EditRelayActivity extends BaseActionBarActivity
|
||||
|
||||
advancedGroup = findViewById(R.id.advanced_group);
|
||||
advancedIcon = findViewById(R.id.advanced_icon);
|
||||
imapFolderLayout = findViewById(R.id.imap_folder);
|
||||
TextView advancedTextView = findViewById(R.id.advanced_text);
|
||||
TextInputEditText imapServerInput = findViewById(R.id.imap_server_text);
|
||||
TextInputEditText imapPortInput = findViewById(R.id.imap_port_text);
|
||||
TextInputEditText imapFolderInput = findViewById(R.id.imap_folder_text);
|
||||
TextInputEditText smtpServerInput = findViewById(R.id.smtp_server_text);
|
||||
TextInputEditText smtpPortInput = findViewById(R.id.smtp_port_text);
|
||||
TextView viewLogText = findViewById(R.id.view_log_button);
|
||||
@@ -197,6 +201,12 @@ public class EditRelayActivity extends BaseActionBarActivity
|
||||
if (config.imapPort != null) imapPortInput.setText(config.imapPort.toString());
|
||||
expandAdvanced = expandAdvanced || config.imapPort != null;
|
||||
|
||||
imapFolderHasValue = !TextUtils.isEmpty(config.imapFolder);
|
||||
if (imapFolderHasValue) {
|
||||
imapFolderInput.setText(config.imapFolder);
|
||||
expandAdvanced = true;
|
||||
}
|
||||
|
||||
intVal = socketSecurityToInt(config.imapSecurity);
|
||||
imapSecurity.setSelection(ViewUtil.checkBounds(intVal, imapSecurity));
|
||||
expandAdvanced = expandAdvanced || intVal != 0;
|
||||
@@ -393,9 +403,11 @@ public class EditRelayActivity extends BaseActionBarActivity
|
||||
boolean advancedViewVisible = advancedGroup.getVisibility() == View.VISIBLE;
|
||||
if (advancedViewVisible) {
|
||||
advancedGroup.setVisibility(View.GONE);
|
||||
imapFolderLayout.setVisibility(View.GONE);
|
||||
advancedIcon.setRotation(45);
|
||||
} else {
|
||||
advancedGroup.setVisibility(View.VISIBLE);
|
||||
imapFolderLayout.setVisibility(imapFolderHasValue ? View.VISIBLE : View.GONE);
|
||||
advancedIcon.setRotation(0);
|
||||
}
|
||||
}
|
||||
@@ -498,6 +510,7 @@ public class EditRelayActivity extends BaseActionBarActivity
|
||||
param.password = getParam(R.id.password_text, false);
|
||||
param.imapServer = getParam(R.id.imap_server_text, true);
|
||||
param.imapPort = Util.objectToInt(getParam(R.id.imap_port_text, true));
|
||||
param.imapFolder = getParam(R.id.imap_folder_text, false);
|
||||
param.imapSecurity = socketSecurityFromInt(imapSecurity.getSelectedItemPosition());
|
||||
param.imapUser = getParam(R.id.imap_login_text, false);
|
||||
param.smtpServer = getParam(R.id.smtp_server_text, true);
|
||||
|
||||
@@ -220,6 +220,24 @@
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/imap_folder"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="58dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="@id/guideline_root_end"
|
||||
app:layout_constraintStart_toStartOf="@id/guideline_root_start"
|
||||
app:layout_constraintTop_toBottomOf="@id/imap_port">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/imap_folder_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="false"
|
||||
android:hint="@string/login_imap_folder" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/imap_security_label"
|
||||
style="@style/TextAppearance.AppCompat.Caption"
|
||||
@@ -228,7 +246,7 @@
|
||||
android:text="@string/login_imap_security"
|
||||
app:layout_constraintEnd_toEndOf="@id/guideline_root_end"
|
||||
app:layout_constraintStart_toStartOf="@id/guideline_root_start"
|
||||
app:layout_constraintTop_toBottomOf="@id/imap_port" />
|
||||
app:layout_constraintTop_toBottomOf="@id/imap_folder" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/imap_security"
|
||||
|
||||
@@ -834,6 +834,7 @@
|
||||
<string name="pref_background_btn_gallery">Select From Gallery</string>
|
||||
<!-- deprecated -->
|
||||
<string name="pref_imap_folder_warn_disable_defaults">If you change this option, make sure, your server and your other clients are configured accordingly.\n\nOtherwise things may not work at all.</string>
|
||||
<string name="login_imap_folder">IMAP folder</string>
|
||||
<!-- No need to be literal here, you can also use "Use Multiple Devices", "Support Multiple Devices" or other fitting terms. However, it should fit to the wording or your language at https://delta.chat/help -->
|
||||
<string name="pref_multidevice">Multi-Device Mode</string>
|
||||
<string name="pref_multidevice_explain">Synchronize your messages with your other devices. Automatically enabled on adding a second device</string>
|
||||
|
||||
Reference in New Issue
Block a user