mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-24 05:55:39 +03:00
Modify change handlers
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
38e48493c0
commit
b728c3beb1
7 changed files with 23 additions and 15 deletions
|
@ -28,7 +28,7 @@ import android.view.ViewGroup;
|
||||||
import com.bluelinelabs.conductor.Conductor;
|
import com.bluelinelabs.conductor.Conductor;
|
||||||
import com.bluelinelabs.conductor.Router;
|
import com.bluelinelabs.conductor.Router;
|
||||||
import com.bluelinelabs.conductor.RouterTransaction;
|
import com.bluelinelabs.conductor.RouterTransaction;
|
||||||
import com.bluelinelabs.conductor.changehandler.FadeChangeHandler;
|
import com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler;
|
||||||
import com.nextcloud.talk.R;
|
import com.nextcloud.talk.R;
|
||||||
import com.nextcloud.talk.application.NextcloudTalkApplication;
|
import com.nextcloud.talk.application.NextcloudTalkApplication;
|
||||||
import com.nextcloud.talk.controllers.BottomNavigationController;
|
import com.nextcloud.talk.controllers.BottomNavigationController;
|
||||||
|
@ -75,12 +75,12 @@ public final class MainActivity extends AppCompatActivity implements ActionBarPr
|
||||||
|
|
||||||
if (!router.hasRootController() && userUtils.anyUserExists()) {
|
if (!router.hasRootController() && userUtils.anyUserExists()) {
|
||||||
router.setRoot(RouterTransaction.with(new BottomNavigationController(R.menu.menu_navigation))
|
router.setRoot(RouterTransaction.with(new BottomNavigationController(R.menu.menu_navigation))
|
||||||
.pushChangeHandler(new FadeChangeHandler())
|
.pushChangeHandler(new HorizontalChangeHandler())
|
||||||
.popChangeHandler(new FadeChangeHandler()));
|
.popChangeHandler(new HorizontalChangeHandler()));
|
||||||
} else if (!router.hasRootController()) {
|
} else if (!router.hasRootController()) {
|
||||||
router.setRoot(RouterTransaction.with(new ServerSelectionController())
|
router.setRoot(RouterTransaction.with(new ServerSelectionController())
|
||||||
.pushChangeHandler(new FadeChangeHandler())
|
.pushChangeHandler(new HorizontalChangeHandler())
|
||||||
.popChangeHandler(new FadeChangeHandler()));
|
.popChangeHandler(new HorizontalChangeHandler()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ import android.view.ViewGroup;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.bluelinelabs.conductor.RouterTransaction;
|
import com.bluelinelabs.conductor.RouterTransaction;
|
||||||
|
import com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler;
|
||||||
import com.nextcloud.talk.R;
|
import com.nextcloud.talk.R;
|
||||||
import com.nextcloud.talk.api.NcApi;
|
import com.nextcloud.talk.api.NcApi;
|
||||||
import com.nextcloud.talk.api.helpers.api.ApiHelper;
|
import com.nextcloud.talk.api.helpers.api.ApiHelper;
|
||||||
|
@ -136,7 +137,9 @@ public class AccountVerificationController extends BaseController {
|
||||||
getResources().getString(
|
getResources().getString(
|
||||||
R.string.nc_display_name_stored));
|
R.string.nc_display_name_stored));
|
||||||
getRouter().setRoot(RouterTransaction.with(new
|
getRouter().setRoot(RouterTransaction.with(new
|
||||||
BottomNavigationController(R.menu.menu_navigation)));
|
BottomNavigationController(R.menu.menu_navigation))
|
||||||
|
.pushChangeHandler(new HorizontalChangeHandler())
|
||||||
|
.popChangeHandler(new HorizontalChangeHandler()));
|
||||||
},
|
},
|
||||||
throwable -> {
|
throwable -> {
|
||||||
progressText.setText(progressText.getText().toString() +
|
progressText.setText(progressText.getText().toString() +
|
||||||
|
|
|
@ -43,7 +43,7 @@ import android.view.ViewTreeObserver;
|
||||||
import android.view.inputmethod.EditorInfo;
|
import android.view.inputmethod.EditorInfo;
|
||||||
|
|
||||||
import com.bluelinelabs.conductor.RouterTransaction;
|
import com.bluelinelabs.conductor.RouterTransaction;
|
||||||
import com.bluelinelabs.conductor.changehandler.FadeChangeHandler;
|
import com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler;
|
||||||
import com.bluelinelabs.logansquare.LoganSquare;
|
import com.bluelinelabs.logansquare.LoganSquare;
|
||||||
import com.nextcloud.talk.R;
|
import com.nextcloud.talk.R;
|
||||||
import com.nextcloud.talk.adapters.items.RoomItem;
|
import com.nextcloud.talk.adapters.items.RoomItem;
|
||||||
|
@ -144,8 +144,8 @@ public class CallsListController extends BaseController implements SearchView.On
|
||||||
// Fallback to login if we have no users
|
// Fallback to login if we have no users
|
||||||
if (getParentController() != null && getParentController().getRouter() != null) {
|
if (getParentController() != null && getParentController().getRouter() != null) {
|
||||||
getParentController().getRouter().setRoot((RouterTransaction.with(new ServerSelectionController())
|
getParentController().getRouter().setRoot((RouterTransaction.with(new ServerSelectionController())
|
||||||
.pushChangeHandler(new FadeChangeHandler())
|
.pushChangeHandler(new HorizontalChangeHandler())
|
||||||
.popChangeHandler(new FadeChangeHandler())));
|
.popChangeHandler(new HorizontalChangeHandler())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ import android.view.ViewTreeObserver;
|
||||||
import android.view.inputmethod.EditorInfo;
|
import android.view.inputmethod.EditorInfo;
|
||||||
|
|
||||||
import com.bluelinelabs.conductor.RouterTransaction;
|
import com.bluelinelabs.conductor.RouterTransaction;
|
||||||
import com.bluelinelabs.conductor.changehandler.FadeChangeHandler;
|
import com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler;
|
||||||
import com.bluelinelabs.logansquare.LoganSquare;
|
import com.bluelinelabs.logansquare.LoganSquare;
|
||||||
import com.nextcloud.talk.R;
|
import com.nextcloud.talk.R;
|
||||||
import com.nextcloud.talk.adapters.items.UserItem;
|
import com.nextcloud.talk.adapters.items.UserItem;
|
||||||
|
@ -149,8 +149,8 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
||||||
// Fallback to login if we have no users
|
// Fallback to login if we have no users
|
||||||
if (getParentController().getRouter() != null) {
|
if (getParentController().getRouter() != null) {
|
||||||
getParentController().getRouter().setRoot((RouterTransaction.with(new ServerSelectionController())
|
getParentController().getRouter().setRoot((RouterTransaction.with(new ServerSelectionController())
|
||||||
.pushChangeHandler(new FadeChangeHandler())
|
.pushChangeHandler(new HorizontalChangeHandler())
|
||||||
.popChangeHandler(new FadeChangeHandler())));
|
.popChangeHandler(new HorizontalChangeHandler())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ import android.view.ViewGroup;
|
||||||
import android.view.inputmethod.EditorInfo;
|
import android.view.inputmethod.EditorInfo;
|
||||||
|
|
||||||
import com.bluelinelabs.conductor.RouterTransaction;
|
import com.bluelinelabs.conductor.RouterTransaction;
|
||||||
|
import com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler;
|
||||||
import com.nextcloud.talk.R;
|
import com.nextcloud.talk.R;
|
||||||
import com.nextcloud.talk.api.NcApi;
|
import com.nextcloud.talk.api.NcApi;
|
||||||
import com.nextcloud.talk.api.helpers.api.ApiHelper;
|
import com.nextcloud.talk.api.helpers.api.ApiHelper;
|
||||||
|
@ -105,7 +106,9 @@ public class ServerSelectionController extends BaseController {
|
||||||
getResources().getString(R.string.nc_server_product_name))) {
|
getResources().getString(R.string.nc_server_product_name))) {
|
||||||
|
|
||||||
getRouter().pushController(RouterTransaction.with(
|
getRouter().pushController(RouterTransaction.with(
|
||||||
new WebViewLoginController(finalServerUrl)));
|
new WebViewLoginController(finalServerUrl))
|
||||||
|
.pushChangeHandler(new HorizontalChangeHandler())
|
||||||
|
.popChangeHandler(new HorizontalChangeHandler()));
|
||||||
} else if (!status.isInstalled()) {
|
} else if (!status.isInstalled()) {
|
||||||
textFieldBoxes.setError(String.format(
|
textFieldBoxes.setError(String.format(
|
||||||
getResources().getString(R.string.nc_server_not_installed), productName),
|
getResources().getString(R.string.nc_server_not_installed), productName),
|
||||||
|
|
|
@ -33,6 +33,7 @@ import android.webkit.WebView;
|
||||||
import android.webkit.WebViewClient;
|
import android.webkit.WebViewClient;
|
||||||
|
|
||||||
import com.bluelinelabs.conductor.RouterTransaction;
|
import com.bluelinelabs.conductor.RouterTransaction;
|
||||||
|
import com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler;
|
||||||
import com.nextcloud.talk.R;
|
import com.nextcloud.talk.R;
|
||||||
import com.nextcloud.talk.api.helpers.api.ApiHelper;
|
import com.nextcloud.talk.api.helpers.api.ApiHelper;
|
||||||
import com.nextcloud.talk.application.NextcloudTalkApplication;
|
import com.nextcloud.talk.application.NextcloudTalkApplication;
|
||||||
|
@ -166,7 +167,8 @@ public class WebViewLoginController extends BaseController {
|
||||||
bundleBuilder.putString(BundleKeys.KEY_TOKEN, userEntity.getToken());
|
bundleBuilder.putString(BundleKeys.KEY_TOKEN, userEntity.getToken());
|
||||||
bundleBuilder.putString(BundleKeys.KEY_BASE_URL, userEntity.getBaseUrl());
|
bundleBuilder.putString(BundleKeys.KEY_BASE_URL, userEntity.getBaseUrl());
|
||||||
getRouter().pushController(RouterTransaction.with(new AccountVerificationController
|
getRouter().pushController(RouterTransaction.with(new AccountVerificationController
|
||||||
(bundleBuilder.build())));
|
(bundleBuilder.build())).pushChangeHandler(new HorizontalChangeHandler())
|
||||||
|
.popChangeHandler(new HorizontalChangeHandler()));
|
||||||
}, throwable -> dispose(),
|
}, throwable -> dispose(),
|
||||||
this::dispose);
|
this::dispose);
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class CachingGlideModule extends AppGlideModule {
|
||||||
// 128 MB
|
// 128 MB
|
||||||
private static final int OK_HTTP_CLIENT_CACHE = 128 * 1024 * 1024;
|
private static final int OK_HTTP_CLIENT_CACHE = 128 * 1024 * 1024;
|
||||||
// 256 MB
|
// 256 MB
|
||||||
private static final int IMAGE_CACHE_SIZE = 256 * 1024 * 1024;
|
private static final int IMAGE_CACHE_SIZE = 256 * 1024 * 1024;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerComponents(Context context, Glide glide, Registry registry) {
|
public void registerComponents(Context context, Glide glide, Registry registry) {
|
||||||
|
|
Loading…
Reference in a new issue