use fab.hide() and fab.show() - this will animate the process

This commit is contained in:
Daniel Gultsch 2018-10-04 16:46:35 +02:00
parent 390175e5b3
commit 657b1cae9d
2 changed files with 3 additions and 14 deletions

View File

@ -471,11 +471,6 @@ public class XmppConnectionService extends Service {
}
public void attachFileToConversation(final Conversation conversation, final Uri uri, final String type, final UiCallback<Message> callback) {
if (FileBackend.weOwnFile(this, uri)) {
Log.d(Config.LOGTAG, "trying to attach file that belonged to us");
callback.error(R.string.security_error_invalid_file_access, null);
return;
}
final Message message;
if (conversation.getNextEncryption() == Message.ENCRYPTION_PGP) {
message = new Message(conversation, "", Message.ENCRYPTION_DECRYPTED);
@ -493,12 +488,6 @@ public class XmppConnectionService extends Service {
}
public void attachImageToConversation(final Conversation conversation, final Uri uri, final UiCallback<Message> callback) {
if (FileBackend.weOwnFile(this, uri)) {
Log.d(Config.LOGTAG, "trying to attach file that belonged to us");
callback.error(R.string.security_error_invalid_file_access, null);
return;
}
final String mimeType = MimeUtils.guessMimeTypeFromUri(this, uri);
final String compressPictures = getCompressPicturesPreference();
@ -1018,7 +1007,7 @@ public class XmppConnectionService extends Service {
}
this.pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
this.wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "XmppConnectionService");
this.wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "Conversations:Service");
toggleForegroundService();
updateUnreadCountBadge();

View File

@ -561,7 +561,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
hideUnreadMessagesCount();
} else {
binding.scrollToBottomButton.setEnabled(true);
binding.scrollToBottomButton.setVisibility(View.VISIBLE);
binding.scrollToBottomButton.show();
if (lastMessageUuid == null) {
lastMessageUuid = conversation.getLatestMessage().getUuid();
}
@ -1965,7 +1965,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
return;
}
this.binding.scrollToBottomButton.setEnabled(false);
this.binding.scrollToBottomButton.setVisibility(View.GONE);
this.binding.scrollToBottomButton.hide();
this.binding.unreadCountCustomView.setVisibility(View.GONE);
}