From 47ee2a24a74d6ef2b990f5848772aed94ca67c8e Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 5 Feb 2020 11:58:08 +0100 Subject: [PATCH] Move NoOpMatrixCallback to MatrixCallback.kt file --- .../matrix/android/api/MatrixCallback.kt | 5 +++++ .../riotx/core/utils/NoOpMatrixCallback.kt | 21 ------------------- .../home/room/detail/RoomDetailViewModel.kt | 2 +- 3 files changed, 6 insertions(+), 22 deletions(-) delete mode 100644 vector/src/main/java/im/vector/riotx/core/utils/NoOpMatrixCallback.kt diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/MatrixCallback.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/MatrixCallback.kt index c2f70ce5dc..e57117f644 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/MatrixCallback.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/MatrixCallback.kt @@ -38,3 +38,8 @@ interface MatrixCallback { // no-op } } + +/** + * Basic no op implementation + */ +class NoOpMatrixCallback: MatrixCallback diff --git a/vector/src/main/java/im/vector/riotx/core/utils/NoOpMatrixCallback.kt b/vector/src/main/java/im/vector/riotx/core/utils/NoOpMatrixCallback.kt deleted file mode 100644 index f24fc2a09c..0000000000 --- a/vector/src/main/java/im/vector/riotx/core/utils/NoOpMatrixCallback.kt +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2020 New Vector Ltd - * - * 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.riotx.core.utils - -import im.vector.matrix.android.api.MatrixCallback - -class NoOpMatrixCallback: MatrixCallback diff --git a/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailViewModel.kt b/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailViewModel.kt index 91e8ab5300..0eee1eaccd 100644 --- a/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailViewModel.kt +++ b/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailViewModel.kt @@ -66,7 +66,7 @@ import im.vector.riotx.core.platform.VectorViewModel import im.vector.riotx.core.resources.StringProvider import im.vector.riotx.core.resources.UserPreferencesProvider import im.vector.riotx.core.utils.LiveEvent -import im.vector.riotx.core.utils.NoOpMatrixCallback +import im.vector.matrix.android.api.NoOpMatrixCallback import im.vector.riotx.core.utils.subscribeLogError import im.vector.riotx.features.command.CommandParser import im.vector.riotx.features.command.ParsedCommand