mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-22 14:11:00 +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);
|
grpHeaders = itemView.findViewById(R.id.grpHeaders);
|
||||||
grpAttachments = itemView.findViewById(R.id.grpAttachments);
|
grpAttachments = itemView.findViewById(R.id.grpAttachments);
|
||||||
grpExpanded = itemView.findViewById(R.id.grpExpanded);
|
grpExpanded = itemView.findViewById(R.id.grpExpanded);
|
||||||
|
|
||||||
tvBody.setMovementMethod(new UrlHandler());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void wire() {
|
private void wire() {
|
||||||
|
@ -493,6 +491,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
ta.recycle();
|
ta.recycle();
|
||||||
|
|
||||||
tvBody.setText(null);
|
tvBody.setText(null);
|
||||||
|
tvBody.setMovementMethod(null);
|
||||||
pbBody.setVisibility(View.VISIBLE);
|
pbBody.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
if (message.content) {
|
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);
|
ibQuotes.setVisibility(has_quotes && show_expanded && !show_quotes ? View.VISIBLE : View.GONE);
|
||||||
ibImages.setVisibility(has_images && show_expanded && !show_images ? View.VISIBLE : View.GONE);
|
ibImages.setVisibility(has_images && show_expanded && !show_images ? View.VISIBLE : View.GONE);
|
||||||
tvBody.setText(body);
|
tvBody.setText(body);
|
||||||
|
tvBody.setMovementMethod(new UrlHandler());
|
||||||
pbBody.setVisibility(View.GONE);
|
pbBody.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,6 @@ import android.graphics.drawable.Drawable;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.provider.ContactsContract;
|
import android.provider.ContactsContract;
|
||||||
import android.provider.OpenableColumns;
|
import android.provider.OpenableColumns;
|
||||||
|
@ -1687,6 +1686,13 @@ public class FragmentCompose extends FragmentEx {
|
||||||
EntityMessage replying = db.message().getMessage(draft.replying);
|
EntityMessage replying = db.message().getMessage(draft.replying);
|
||||||
EntityOperation.queue(db, replying, EntityOperation.ANSWERED, true);
|
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();
|
db.setTransactionSuccessful();
|
||||||
|
@ -1712,7 +1718,7 @@ public class FragmentCompose extends FragmentEx {
|
||||||
|
|
||||||
if (action == R.id.action_delete) {
|
if (action == R.id.action_delete) {
|
||||||
autosave = false;
|
autosave = false;
|
||||||
getFragmentManager().popBackStack();
|
finish();
|
||||||
|
|
||||||
} else if (action == R.id.action_save) {
|
} else if (action == R.id.action_save) {
|
||||||
// Do nothing
|
// Do nothing
|
||||||
|
@ -1722,8 +1728,7 @@ public class FragmentCompose extends FragmentEx {
|
||||||
|
|
||||||
} else if (action == R.id.action_send) {
|
} else if (action == R.id.action_send) {
|
||||||
autosave = false;
|
autosave = false;
|
||||||
getFragmentManager().popBackStack();
|
finish();
|
||||||
Toast.makeText(getContext(), R.string.title_queued, Toast.LENGTH_LONG).show();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1733,7 +1738,9 @@ public class FragmentCompose extends FragmentEx {
|
||||||
Helper.setViewsEnabled(view, true);
|
Helper.setViewsEnabled(view, true);
|
||||||
getActivity().invalidateOptionsMenu();
|
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();
|
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show();
|
||||||
else
|
else
|
||||||
Helper.unexpectedError(getContext(), getViewLifecycleOwner(), ex);
|
Helper.unexpectedError(getContext(), getViewLifecycleOwner(), ex);
|
||||||
|
|
Loading…
Reference in a new issue