浏览代码

Finish migration to AndroidX

Mario Danic 6 年之前
父节点
当前提交
cced5fd2c0

+ 1 - 1
app/src/main/java/com/nextcloud/talk/controllers/base/BaseController.java

@@ -42,7 +42,7 @@ import javax.inject.Inject;
 import autodagger.AutoInjector;
 
 @AutoInjector(NextcloudTalkApplication.class)
-public abstract class BaseController extends RefWatchingController {
+public abstract class BaseController extends ButterKnifeController {
 
     private static final String TAG = "BaseController";
     @Inject

+ 0 - 57
app/src/main/java/com/nextcloud/talk/controllers/base/RefWatchingController.java

@@ -1,57 +0,0 @@
-/**
- * Nextcloud Talk application
- *
- * @author BlueLine Labs, Inc.
- * Copyright (C) 2016 BlueLine Labs, Inc.
- *
- * 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 com.nextcloud.talk.controllers.base;
-
-import android.os.Bundle;
-import androidx.annotation.NonNull;
-
-import com.bluelinelabs.conductor.ControllerChangeHandler;
-import com.bluelinelabs.conductor.ControllerChangeType;
-import com.nextcloud.talk.application.NextcloudTalkApplication;
-
-public abstract class RefWatchingController extends ButterKnifeController {
-
-    private boolean hasExited;
-
-    protected RefWatchingController() {
-    }
-
-    protected RefWatchingController(Bundle args) {
-        super(args);
-    }
-
-    @Override
-    public void onDestroy() {
-        super.onDestroy();
-
-        if (hasExited) {
-            NextcloudTalkApplication.refWatcher.watch(this);
-        }
-    }
-
-    @Override
-    protected void onChangeEnded(@NonNull ControllerChangeHandler changeHandler, @NonNull ControllerChangeType changeType) {
-        super.onChangeEnded(changeHandler, changeType);
-
-        hasExited = !changeType.isEnter;
-        if (isDestroyed()) {
-            NextcloudTalkApplication.refWatcher.watch(this);
-        }
-    }
-}