From 657b1cae9d8b0e70cf492a79c91b2aaecab9dd20 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 4 Oct 2018 16:46:35 +0200 Subject: [PATCH] use fab.hide() and fab.show() - this will animate the process --- .../services/XmppConnectionService.java | 13 +------------ .../conversations/ui/ConversationFragment.java | 4 ++-- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 8d63dc17a..09045703b 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -471,11 +471,6 @@ public class XmppConnectionService extends Service { } public void attachFileToConversation(final Conversation conversation, final Uri uri, final String type, final UiCallback 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 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(); diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index 9555d9050..d1a93d9e3 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -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); }