mirror of https://github.com/M66B/FairEmail.git
Refactoring, updated text
This commit is contained in:
parent
78d524ef56
commit
352f757ede
|
@ -3205,7 +3205,7 @@ public class FragmentCompose extends FragmentBase {
|
||||||
|
|
||||||
data.identities = db.identity().getComposableIdentities(null);
|
data.identities = db.identity().getComposableIdentities(null);
|
||||||
if (data.identities == null || data.identities.size() == 0)
|
if (data.identities == null || data.identities.size() == 0)
|
||||||
throw new IllegalStateException(context.getString(R.string.title_no_identities));
|
throw new IllegalStateException(context.getString(R.string.title_no_composable));
|
||||||
|
|
||||||
data.draft = db.message().getMessage(id);
|
data.draft = db.message().getMessage(id);
|
||||||
if (data.draft == null || data.draft.ui_hide) {
|
if (data.draft == null || data.draft.ui_hide) {
|
||||||
|
@ -3315,7 +3315,7 @@ public class FragmentCompose extends FragmentBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selected == null)
|
if (selected == null)
|
||||||
throw new IllegalArgumentException(context.getString(R.string.title_no_identities));
|
throw new IllegalArgumentException(context.getString(R.string.title_no_composable));
|
||||||
|
|
||||||
if (plain_only)
|
if (plain_only)
|
||||||
data.draft.plain_only = true;
|
data.draft.plain_only = true;
|
||||||
|
|
|
@ -71,7 +71,7 @@ public class FragmentSetup extends FragmentBase {
|
||||||
private TextView tvIdentityDone;
|
private TextView tvIdentityDone;
|
||||||
private Button btnIdentity;
|
private Button btnIdentity;
|
||||||
private TextView tvIdentityWhat;
|
private TextView tvIdentityWhat;
|
||||||
private TextView tvNoIdentities;
|
private TextView tvNoComposable;
|
||||||
|
|
||||||
private TextView tvPermissionsDone;
|
private TextView tvPermissionsDone;
|
||||||
private Button btnPermissions;
|
private Button btnPermissions;
|
||||||
|
@ -118,7 +118,7 @@ public class FragmentSetup extends FragmentBase {
|
||||||
tvIdentityDone = view.findViewById(R.id.tvIdentityDone);
|
tvIdentityDone = view.findViewById(R.id.tvIdentityDone);
|
||||||
btnIdentity = view.findViewById(R.id.btnIdentity);
|
btnIdentity = view.findViewById(R.id.btnIdentity);
|
||||||
tvIdentityWhat = view.findViewById(R.id.tvIdentityWhat);
|
tvIdentityWhat = view.findViewById(R.id.tvIdentityWhat);
|
||||||
tvNoIdentities = view.findViewById(R.id.tvNoIdentities);
|
tvNoComposable = view.findViewById(R.id.tvNoComposable);
|
||||||
|
|
||||||
tvPermissionsDone = view.findViewById(R.id.tvPermissionsDone);
|
tvPermissionsDone = view.findViewById(R.id.tvPermissionsDone);
|
||||||
btnPermissions = view.findViewById(R.id.btnPermissions);
|
btnPermissions = view.findViewById(R.id.btnPermissions);
|
||||||
|
@ -311,7 +311,7 @@ public class FragmentSetup extends FragmentBase {
|
||||||
tvIdentityDone.setText(null);
|
tvIdentityDone.setText(null);
|
||||||
tvIdentityDone.setCompoundDrawables(null, null, null, null);
|
tvIdentityDone.setCompoundDrawables(null, null, null, null);
|
||||||
btnIdentity.setEnabled(false);
|
btnIdentity.setEnabled(false);
|
||||||
tvNoIdentities.setVisibility(View.GONE);
|
tvNoComposable.setVisibility(View.GONE);
|
||||||
|
|
||||||
tvPermissionsDone.setText(null);
|
tvPermissionsDone.setText(null);
|
||||||
tvPermissionsDone.setCompoundDrawables(null, null, null, null);
|
tvPermissionsDone.setCompoundDrawables(null, null, null, null);
|
||||||
|
@ -393,7 +393,7 @@ public class FragmentSetup extends FragmentBase {
|
||||||
tvIdentityDone.setText(done ? R.string.title_setup_done : R.string.title_setup_to_do);
|
tvIdentityDone.setText(done ? R.string.title_setup_done : R.string.title_setup_to_do);
|
||||||
tvIdentityDone.setTextColor(done ? textColorPrimary : colorWarning);
|
tvIdentityDone.setTextColor(done ? textColorPrimary : colorWarning);
|
||||||
tvIdentityDone.setCompoundDrawablesWithIntrinsicBounds(done ? check : null, null, null, null);
|
tvIdentityDone.setCompoundDrawablesWithIntrinsicBounds(done ? check : null, null, null, null);
|
||||||
tvNoIdentities.setVisibility(done ? View.GONE : View.VISIBLE);
|
tvNoComposable.setVisibility(done ? View.GONE : View.VISIBLE);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1049,7 +1049,7 @@ public class Log {
|
||||||
|
|
||||||
List<TupleIdentityEx> identities = db.identity().getComposableIdentities(null);
|
List<TupleIdentityEx> identities = db.identity().getComposableIdentities(null);
|
||||||
if (identities == null || identities.size() == 0)
|
if (identities == null || identities.size() == 0)
|
||||||
throw new IllegalArgumentException(context.getString(R.string.title_no_identities));
|
throw new IllegalArgumentException(context.getString(R.string.title_no_composable));
|
||||||
|
|
||||||
EntityIdentity identity = identities.get(0);
|
EntityIdentity identity = identities.get(0);
|
||||||
EntityFolder drafts = db.folder().getFolderByType(identity.account, EntityFolder.DRAFTS);
|
EntityFolder drafts = db.folder().getFolderByType(identity.account, EntityFolder.DRAFTS);
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
android:text="@string/title_no_identities"
|
android:text="@string/title_no_composable"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/cbNotAgain" />
|
app:layout_constraintTop_toBottomOf="@id/cbNotAgain" />
|
||||||
|
|
|
@ -240,17 +240,6 @@
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@id/tvAccountDone" />
|
app:layout_constraintTop_toTopOf="@id/tvAccountDone" />
|
||||||
|
|
||||||
<eu.faircode.email.FixedTextView
|
|
||||||
android:id="@+id/tvNoIdentities"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="12dp"
|
|
||||||
android:text="@string/title_no_identities"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
|
||||||
android:textColor="?attr/colorWarning"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/btnAccount" />
|
|
||||||
|
|
||||||
<!-- identity -->
|
<!-- identity -->
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
@ -261,7 +250,7 @@
|
||||||
android:background="?attr/colorSeparator"
|
android:background="?attr/colorSeparator"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvNoIdentities" />
|
app:layout_constraintTop_toBottomOf="@id/btnAccount" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/two"
|
android:id="@+id/two"
|
||||||
|
@ -360,6 +349,17 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/btnIdentity" />
|
app:layout_constraintTop_toBottomOf="@id/btnIdentity" />
|
||||||
|
|
||||||
|
<eu.faircode.email.FixedTextView
|
||||||
|
android:id="@+id/tvNoComposable"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:text="@string/title_no_composable"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||||
|
android:textColor="?attr/colorWarning"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvIdentityWhat" />
|
||||||
|
|
||||||
<!-- permissions -->
|
<!-- permissions -->
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
@ -370,7 +370,7 @@
|
||||||
android:background="?attr/colorSeparator"
|
android:background="?attr/colorSeparator"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvIdentityWhat" />
|
app:layout_constraintTop_toBottomOf="@id/tvNoComposable" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/three"
|
android:id="@+id/three"
|
||||||
|
|
|
@ -660,7 +660,7 @@
|
||||||
<string name="title_no_inbox">Inbox not found</string>
|
<string name="title_no_inbox">Inbox not found</string>
|
||||||
<string name="title_no_drafts">No drafts folder</string>
|
<string name="title_no_drafts">No drafts folder</string>
|
||||||
<string name="title_no_junk_folder">There is no spam folder selected for this account</string>
|
<string name="title_no_junk_folder">There is no spam folder selected for this account</string>
|
||||||
<string name="title_no_identities">Sending emails requires at least one identity and a drafts folder</string>
|
<string name="title_no_composable">Sending emails requires an identity to be configured, and a drafts folder to be selected in the account settings</string>
|
||||||
<string name="title_no_standard">This provider uses a proprietary email protocol and therefore it is not possible to use third party email clients</string>
|
<string name="title_no_standard">This provider uses a proprietary email protocol and therefore it is not possible to use third party email clients</string>
|
||||||
<string name="title_no_idle">This provider does not support push messages. This will delay reception of new messages and increase battery usage.</string>
|
<string name="title_no_idle">This provider does not support push messages. This will delay reception of new messages and increase battery usage.</string>
|
||||||
<string name="title_no_utf8">This provider does not support UTF-8</string>
|
<string name="title_no_utf8">This provider does not support UTF-8</string>
|
||||||
|
|
Loading…
Reference in New Issue