Browse Source

Merge branch 'fix-select-compose-message-indentities' into 'develop'

Fix select compose message indentities
See merge request dystopia-project/simple-email!6
main
Distopico Vegan 5 years ago
parent
commit
0b8ce81344
44 changed files with 87 additions and 12 deletions
  1. +6
    -1
      app/src/main/java/org/dystopia/email/FragmentCompose.java
  2. +11
    -4
      app/src/main/java/org/dystopia/email/FragmentIdentities.java
  3. +11
    -7
      app/src/main/res/layout/fragment_compose.xml
  4. +17
    -0
      app/src/main/res/layout/fragment_identities.xml
  5. +1
    -0
      app/src/main/res/values-af/strings.xml
  6. +1
    -0
      app/src/main/res/values-ar-rBH/strings.xml
  7. +1
    -0
      app/src/main/res/values-ar-rEG/strings.xml
  8. +1
    -0
      app/src/main/res/values-ar-rSA/strings.xml
  9. +1
    -0
      app/src/main/res/values-ar-rYE/strings.xml
  10. +1
    -0
      app/src/main/res/values-ar/strings.xml
  11. +1
    -0
      app/src/main/res/values-az/strings.xml
  12. +1
    -0
      app/src/main/res/values-ca/strings.xml
  13. +1
    -0
      app/src/main/res/values-cs/strings.xml
  14. +1
    -0
      app/src/main/res/values-da/strings.xml
  15. +1
    -0
      app/src/main/res/values-de/strings.xml
  16. +1
    -0
      app/src/main/res/values-el/strings.xml
  17. +1
    -0
      app/src/main/res/values-en/strings.xml
  18. +1
    -0
      app/src/main/res/values-es-rES/strings.xml
  19. +1
    -0
      app/src/main/res/values-fa/strings.xml
  20. +1
    -0
      app/src/main/res/values-fi/strings.xml
  21. +1
    -0
      app/src/main/res/values-fr/strings.xml
  22. +1
    -0
      app/src/main/res/values-he/strings.xml
  23. +1
    -0
      app/src/main/res/values-hu/strings.xml
  24. +1
    -0
      app/src/main/res/values-it/strings.xml
  25. +1
    -0
      app/src/main/res/values-iw/strings.xml
  26. +1
    -0
      app/src/main/res/values-ja/strings.xml
  27. +1
    -0
      app/src/main/res/values-ko/strings.xml
  28. +1
    -0
      app/src/main/res/values-nb/strings.xml
  29. +1
    -0
      app/src/main/res/values-nl/strings.xml
  30. +1
    -0
      app/src/main/res/values-no/strings.xml
  31. +1
    -0
      app/src/main/res/values-pl/strings.xml
  32. +1
    -0
      app/src/main/res/values-pt-rBR/strings.xml
  33. +1
    -0
      app/src/main/res/values-pt-rPT/strings.xml
  34. +1
    -0
      app/src/main/res/values-ro/strings.xml
  35. +1
    -0
      app/src/main/res/values-ru/strings.xml
  36. +1
    -0
      app/src/main/res/values-sr/strings.xml
  37. +1
    -0
      app/src/main/res/values-sv-rSE/strings.xml
  38. +1
    -0
      app/src/main/res/values-tr/strings.xml
  39. +1
    -0
      app/src/main/res/values-uk/strings.xml
  40. +1
    -0
      app/src/main/res/values-vi/strings.xml
  41. +1
    -0
      app/src/main/res/values-zh-rCN/strings.xml
  42. +1
    -0
      app/src/main/res/values-zh-rTW/strings.xml
  43. +3
    -0
      app/src/main/res/values/dimens.xml
  44. +1
    -0
      app/src/main/res/values/strings.xml

+ 6
- 1
app/src/main/java/org/dystopia/email/FragmentCompose.java View File

@ -1443,7 +1443,12 @@ public class FragmentCompose extends FragmentEx {
new Runnable() {
@Override
public void run() {
etTo.requestFocus();
String etToText = etTo.getText().toString();
if (etToText != null && etToText.length() > 0) {
etBody.requestFocus();
} else {
etTo.requestFocus();
}
}
});
}


+ 11
- 4
app/src/main/java/org/dystopia/email/FragmentIdentities.java View File

@ -34,8 +34,10 @@ import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import java.util.ArrayList;
import java.util.List;
import android.widget.TextView;
public class FragmentIdentities extends FragmentEx {
private TextView tvNoIdentities;
private RecyclerView rvIdentity;
private ProgressBar pbWait;
private Group grpReady;
@ -55,6 +57,7 @@ public class FragmentIdentities extends FragmentEx {
// Get controls
rvIdentity = view.findViewById(R.id.rvIdentity);
tvNoIdentities = view.findViewById(R.id.tvNoIdentities);
pbWait = view.findViewById(R.id.pbWait);
grpReady = view.findViewById(R.id.grpReady);
fab = view.findViewById(R.id.fab);
@ -85,6 +88,7 @@ public class FragmentIdentities extends FragmentEx {
// Initialize
grpReady.setVisibility(View.GONE);
tvNoIdentities.setVisibility(View.GONE);
pbWait.setVisibility(View.VISIBLE);
return view;
@ -103,10 +107,13 @@ public class FragmentIdentities extends FragmentEx {
new Observer<List<TupleIdentityEx>>() {
@Override
public void onChanged(@Nullable List<TupleIdentityEx> identities) {
adapter.set(
identities == null
? new ArrayList<TupleIdentityEx>()
: identities);
if (identities == null) {
identities = new ArrayList<TupleIdentityEx>();
} else if (identities.size() == 0) {
tvNoIdentities.setVisibility(View.VISIBLE);
}
adapter.set(identities);
pbWait.setVisibility(View.GONE);
grpReady.setVisibility(View.VISIBLE);


+ 11
- 7
app/src/main/res/layout/fragment_compose.xml View File

@ -7,6 +7,7 @@
<ScrollView xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="0dp"
android:id="@+id/sw"
app:layout_constraintBottom_toTopOf="@+id/bottom_navigation"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
@ -19,7 +20,9 @@
android:id="@+id/spFrom"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:layout_marginTop="@dimen/content_margin"
android:layout_marginHorizontal="@dimen/content_margin"
android:minHeight="@dimen/input_height"
app:layout_constraintEnd_toStartOf="@+id/ivIdentityAdd"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
@ -137,9 +140,9 @@
android:id="@+id/rvAttachment"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:layout_marginTop="3dp"
android:layout_marginEnd="6dp"
android:layout_marginHorizontal="@dimen/content_margin"
android:layout_marginTop="@dimen/content_margin"
android:padding="@dimen/compose_padding"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/vSeparatorAttachments" />
@ -148,7 +151,7 @@
android:id="@+id/vSeparator"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="6dp"
android:layout_marginTop="@dimen/content_margin"
android:background="?attr/colorSeparator"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/rvAttachment" />
@ -157,8 +160,9 @@
android:id="@+id/etBody"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:layout_marginEnd="6dp"
android:layout_marginHorizontal="@dimen/content_margin"
android:layout_marginVertical="@dimen/content_margin"
android:padding="@dimen/compose_padding"
android:background="@null"
android:fontFamily="monospace"
android:gravity="top"


+ 17
- 0
app/src/main/res/layout/fragment_identities.xml View File

@ -34,6 +34,23 @@
android:layout_height="0dp"
app:constraint_referenced_ids="rvIdentity" />
<TextView
android:id="@+id/tvNoIdentities"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:minHeight="33dp"
android:alpha = "0.8"
android:layout_marginEnd="@dimen/layout_margin"
android:layout_marginStart="@dimen/layout_margin"
android:text="@string/title_no_identities_yet"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="?android:attr/textColorPrimary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"


+ 1
- 0
app/src/main/res/values-af/strings.xml View File

@ -257,4 +257,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-ar-rBH/strings.xml View File

@ -273,4 +273,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-ar-rEG/strings.xml View File

@ -273,4 +273,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-ar-rSA/strings.xml View File

@ -273,4 +273,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-ar-rYE/strings.xml View File

@ -273,4 +273,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-ar/strings.xml View File

@ -273,4 +273,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-az/strings.xml View File

@ -257,4 +257,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-ca/strings.xml View File

@ -257,4 +257,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-cs/strings.xml View File

@ -265,4 +265,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-da/strings.xml View File

@ -257,4 +257,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-de/strings.xml View File

@ -257,4 +257,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-el/strings.xml View File

@ -257,4 +257,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-en/strings.xml View File

@ -257,4 +257,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-es-rES/strings.xml View File

@ -257,4 +257,5 @@
<string name="title_no_storage_framework">Framework de almacenamiento no disponible</string>
<string name="title_show_details">Ver detalles</string>
<string name="title_no_accounts_yet">Aún no tienes cuentas configuradas</string>
<string name="title_no_identities_yet">Aún no tienes identidades configuradas</string>
</resources>

+ 1
- 0
app/src/main/res/values-fa/strings.xml View File

@ -257,4 +257,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-fi/strings.xml View File

@ -257,4 +257,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-fr/strings.xml View File

@ -257,4 +257,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-he/strings.xml View File

@ -265,4 +265,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-hu/strings.xml View File

@ -257,4 +257,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-it/strings.xml View File

@ -257,4 +257,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-iw/strings.xml View File

@ -265,4 +265,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-ja/strings.xml View File

@ -253,4 +253,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-ko/strings.xml View File

@ -253,4 +253,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-nb/strings.xml View File

@ -257,4 +257,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-nl/strings.xml View File

@ -257,4 +257,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-no/strings.xml View File

@ -257,4 +257,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-pl/strings.xml View File

@ -265,4 +265,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-pt-rBR/strings.xml View File

@ -257,4 +257,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-pt-rPT/strings.xml View File

@ -257,4 +257,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-ro/strings.xml View File

@ -261,4 +261,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-ru/strings.xml View File

@ -265,4 +265,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-sr/strings.xml View File

@ -261,4 +261,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-sv-rSE/strings.xml View File

@ -257,4 +257,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-tr/strings.xml View File

@ -257,4 +257,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-uk/strings.xml View File

@ -265,4 +265,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-vi/strings.xml View File

@ -253,4 +253,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-zh-rCN/strings.xml View File

@ -253,4 +253,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 1
- 0
app/src/main/res/values-zh-rTW/strings.xml View File

@ -253,4 +253,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

+ 3
- 0
app/src/main/res/values/dimens.xml View File

@ -2,4 +2,7 @@
<resources>
<dimen name="layout_margin">12dp</dimen>
<dimen name="widget_padding">6dp</dimen>
<dimen name="content_margin">6dp</dimen>
<dimen name="compose_padding">6dp</dimen>
<dimen name="input_height">40dp</dimen>
</resources>

+ 1
- 0
app/src/main/res/values/strings.xml View File

@ -323,4 +323,5 @@
<string name="title_no_storage_framework">Storage framework not available</string>
<string name="title_show_details">See details</string>
<string name="title_no_accounts_yet">You don\'t have accounts configured yet</string>
<string name="title_no_identities_yet">You don\'t have identities configured yet</string>
</resources>

Loading…
Cancel
Save