Browse Source

chore: no hide size to keep the view structure

main
Distopico Vegan 6 years ago
parent
commit
0ab36ff513
4 changed files with 8 additions and 9 deletions
  1. +1
    -1
      .gitlab-ci.yml
  2. +5
    -6
      app/src/main/java/org/dystopia/email/AdapterMessage.java
  3. +1
    -1
      app/src/main/res/layout/item_message_compact.xml
  4. +1
    -1
      app/src/main/res/layout/item_message_normal.xml

+ 1
- 1
.gitlab-ci.yml View File

@ -99,4 +99,4 @@ release:
script: script:
- npm install -g semantic-release @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/changelog @semantic-release/gitlab - npm install -g semantic-release @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/changelog @semantic-release/gitlab
- git checkout $CI_COMMIT_SHA - git checkout $CI_COMMIT_SHA
- semantic-release -p @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/changelog @semantic-release/gitlab --debug
- semantic-release -p @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/changelog @semantic-release/gitlab

+ 5
- 6
app/src/main/java/org/dystopia/email/AdapterMessage.java View File

@ -319,14 +319,13 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
tvSize.setText(message.size == null ? null : Helper.humanReadableByteCount(message.size, true)); tvSize.setText(message.size == null ? null : Helper.humanReadableByteCount(message.size, true));
tvSize.setAlpha(message.content ? 1.0f : 0.5f); tvSize.setAlpha(message.content ? 1.0f : 0.5f);
tvSize.setVisibility(message.size == null ? View.GONE : View.VISIBLE);
ivAttachments.setVisibility(message.attachments > 0 ? View.VISIBLE : View.GONE); ivAttachments.setVisibility(message.attachments > 0 ? View.VISIBLE : View.GONE);
tvSubject.setText(message.subject); tvSubject.setText(message.subject);
tvFolder.setVisibility(View.GONE); tvFolder.setVisibility(View.GONE);
tvAccount.setVisibility(View.GONE); tvAccount.setVisibility(View.GONE);
if (viewType == ViewType.UNIFIED || viewType == ViewType.FOLDER) { if (viewType == ViewType.UNIFIED || viewType == ViewType.FOLDER) {
tvAccount.setText(message.accountName); tvAccount.setText(message.accountName);
tvAccount.setVisibility(View.VISIBLE); tvAccount.setVisibility(View.VISIBLE);
@ -382,7 +381,7 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
grpExpanded.setVisibility(viewType == ViewType.THREAD && show_expanded ? View.VISIBLE : View.GONE); grpExpanded.setVisibility(viewType == ViewType.THREAD && show_expanded ? View.VISIBLE : View.GONE);
ivAddContact.setVisibility(viewType == ViewType.THREAD && show_expanded && contacts && message.from != null ? View.VISIBLE : View.GONE); ivAddContact.setVisibility(viewType == ViewType.THREAD && show_expanded && contacts && message.from != null ? View.VISIBLE : View.GONE);
grpDetails.setVisibility(show_details && show_expanded ? View.VISIBLE : View.GONE); grpDetails.setVisibility(show_details && show_expanded ? View.VISIBLE : View.GONE);
pbHeaders.setVisibility(View.GONE); pbHeaders.setVisibility(View.GONE);
@ -1052,7 +1051,7 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
notifyDataSetChanged(); notifyDataSetChanged();
} }
} }
private void onShowHeaders(ActionData data) { private void onShowHeaders(ActionData data) {
boolean show_headers = !properties.showHeaders(data.message.id); boolean show_headers = !properties.showHeaders(data.message.id);
properties.setHeaders(data.message.id, show_headers); properties.setHeaders(data.message.id, show_headers);
@ -1461,7 +1460,7 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
void setExpanded(long id, boolean expand); void setExpanded(long id, boolean expand);
void setDetails(long id, boolean show); void setDetails(long id, boolean show);
void setHeaders(long id, boolean show); void setHeaders(long id, boolean show);
void setImages(long id, boolean show); void setImages(long id, boolean show);
@ -1469,7 +1468,7 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
boolean isExpanded(long id); boolean isExpanded(long id);
boolean showDetails(long id); boolean showDetails(long id);
boolean showHeaders(long id); boolean showHeaders(long id);
boolean showImages(long id); boolean showImages(long id);


+ 1
- 1
app/src/main/res/layout/item_message_compact.xml View File

@ -191,7 +191,7 @@
android:textIsSelectable="true" android:textIsSelectable="true"
app:layout_constraintEnd_toStartOf="@+id/paddingEnd" app:layout_constraintEnd_toStartOf="@+id/paddingEnd"
app:layout_constraintStart_toEndOf="@id/paddingStart" app:layout_constraintStart_toEndOf="@id/paddingStart"
app:layout_constraintTop_toBottomOf="@id/tvCount" />
app:layout_constraintTop_toBottomOf="@id/tvSize" />
<View <View
android:id="@+id/paddingEnd" android:id="@+id/paddingEnd"


+ 1
- 1
app/src/main/res/layout/item_message_normal.xml View File

@ -189,7 +189,7 @@
android:textIsSelectable="true" android:textIsSelectable="true"
app:layout_constraintEnd_toStartOf="@+id/paddingEnd" app:layout_constraintEnd_toStartOf="@+id/paddingEnd"
app:layout_constraintStart_toEndOf="@id/paddingStart" app:layout_constraintStart_toEndOf="@id/paddingStart"
app:layout_constraintTop_toBottomOf="@id/tvCount" />
app:layout_constraintTop_toBottomOf="@+id/tvSize" />
<View <View
android:id="@+id/paddingEnd" android:id="@+id/paddingEnd"


Loading…
Cancel
Save