This commit is contained in:
Maxime Naturel 2022-02-23 14:08:02 +01:00
parent 0169396d7d
commit e6995cbdd4
2 changed files with 24 additions and 0 deletions

View file

@ -0,0 +1,22 @@
/*
* Copyright (c) 2020 New Vector Ltd
* Copyright (C) 2018 stfalcon.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.lib.attachmentviewer
class AttachmentViewerViewModel {
}

View file

@ -554,6 +554,7 @@ class MessageActionsViewModel @AssistedInject constructor(@Assisted
}
}
// TODO need to add this check into media viewer?
private fun canShare(msgType: String?): Boolean {
return when (msgType) {
MessageType.MSGTYPE_TEXT,
@ -568,6 +569,7 @@ class MessageActionsViewModel @AssistedInject constructor(@Assisted
}
}
// TODO need to add this into Viewer screen to check if it is saveable? => create extension on MessageType?
private fun canSave(msgType: String?): Boolean {
return when (msgType) {
MessageType.MSGTYPE_IMAGE,