mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-21 21:57:19 +00:00
Fixed message text positioning, small improvement
This commit is contained in:
parent
39923295f8
commit
d137cc8c85
2 changed files with 14 additions and 7 deletions
|
@ -248,8 +248,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
grpHeaders = itemView.findViewById(R.id.grpHeaders);
|
||||
grpAttachments = itemView.findViewById(R.id.grpAttachments);
|
||||
grpExpanded = itemView.findViewById(R.id.grpExpanded);
|
||||
|
||||
tvBody.setMovementMethod(new UrlHandler());
|
||||
}
|
||||
|
||||
private void wire() {
|
||||
|
@ -493,6 +491,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
ta.recycle();
|
||||
|
||||
tvBody.setText(null);
|
||||
tvBody.setMovementMethod(null);
|
||||
pbBody.setVisibility(View.VISIBLE);
|
||||
|
||||
if (message.content) {
|
||||
|
@ -849,6 +848,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
ibQuotes.setVisibility(has_quotes && show_expanded && !show_quotes ? View.VISIBLE : View.GONE);
|
||||
ibImages.setVisibility(has_images && show_expanded && !show_images ? View.VISIBLE : View.GONE);
|
||||
tvBody.setText(body);
|
||||
tvBody.setMovementMethod(new UrlHandler());
|
||||
pbBody.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@ import android.graphics.drawable.Drawable;
|
|||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.provider.ContactsContract;
|
||||
import android.provider.OpenableColumns;
|
||||
|
@ -1687,6 +1686,13 @@ public class FragmentCompose extends FragmentEx {
|
|||
EntityMessage replying = db.message().getMessage(draft.replying);
|
||||
EntityOperation.queue(db, replying, EntityOperation.ANSWERED, true);
|
||||
}
|
||||
|
||||
Handler handler = new Handler(context.getMainLooper());
|
||||
handler.post(new Runnable() {
|
||||
public void run() {
|
||||
Toast.makeText(context, R.string.title_queued, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
db.setTransactionSuccessful();
|
||||
|
@ -1712,7 +1718,7 @@ public class FragmentCompose extends FragmentEx {
|
|||
|
||||
if (action == R.id.action_delete) {
|
||||
autosave = false;
|
||||
getFragmentManager().popBackStack();
|
||||
finish();
|
||||
|
||||
} else if (action == R.id.action_save) {
|
||||
// Do nothing
|
||||
|
@ -1722,8 +1728,7 @@ public class FragmentCompose extends FragmentEx {
|
|||
|
||||
} else if (action == R.id.action_send) {
|
||||
autosave = false;
|
||||
getFragmentManager().popBackStack();
|
||||
Toast.makeText(getContext(), R.string.title_queued, Toast.LENGTH_LONG).show();
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1733,7 +1738,9 @@ public class FragmentCompose extends FragmentEx {
|
|||
Helper.setViewsEnabled(view, true);
|
||||
getActivity().invalidateOptionsMenu();
|
||||
|
||||
if (ex instanceof IllegalArgumentException)
|
||||
if (ex instanceof MessageRemovedException)
|
||||
finish();
|
||||
else if (ex instanceof IllegalArgumentException)
|
||||
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show();
|
||||
else
|
||||
Helper.unexpectedError(getContext(), getViewLifecycleOwner(), ex);
|
||||
|
|
Loading…
Reference in a new issue