diff --git a/app/src/main/java/com/nextcloud/talk/events/BottomSheetLockEvent.java b/app/src/main/java/com/nextcloud/talk/events/BottomSheetLockEvent.java deleted file mode 100644 index d8ac1ba0d..000000000 --- a/app/src/main/java/com/nextcloud/talk/events/BottomSheetLockEvent.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Nextcloud Talk application - * - * @author Mario Danic - * Copyright (C) 2017 Mario Danic - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.nextcloud.talk.events; - -import lombok.Data; - -@Data -public class BottomSheetLockEvent { - public final boolean cancelable; - public final int delay; - public final boolean shouldRefreshData; - public final boolean cancel; - public boolean dismissView; - - public BottomSheetLockEvent(boolean cancelable, int delay, boolean shouldRefreshData, - boolean cancel) { - this.cancelable = cancelable; - this.delay = delay; - this.shouldRefreshData = shouldRefreshData; - this.cancel = cancel; - this.dismissView = true; - } - - public BottomSheetLockEvent(boolean cancelable, int delay, boolean shouldRefreshData, - boolean cancel, boolean - dismissView) { - this.cancelable = cancelable; - this.delay = delay; - this.shouldRefreshData = shouldRefreshData; - this.cancel = cancel; - this.dismissView = dismissView; - } -} diff --git a/app/src/main/java/com/nextcloud/talk/interfaces/ConversationMenuInterface.kt b/app/src/main/java/com/nextcloud/talk/interfaces/ConversationMenuInterface.kt deleted file mode 100644 index 4d0a5afaf..000000000 --- a/app/src/main/java/com/nextcloud/talk/interfaces/ConversationMenuInterface.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Nextcloud Talk application - * - * @author Mario Danic - * Copyright (C) 2017-2018 Mario Danic - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.nextcloud.talk.interfaces - -import android.os.Bundle - -interface ConversationMenuInterface { - fun openLovelyDialogWithIdAndBundle( - dialogId: Int, - bundle: Bundle - ) -} diff --git a/app/src/main/java/com/nextcloud/talk/interfaces/SelectionInterface.kt b/app/src/main/java/com/nextcloud/talk/interfaces/SelectionInterface.kt index 4766c5534..e11551a87 100644 --- a/app/src/main/java/com/nextcloud/talk/interfaces/SelectionInterface.kt +++ b/app/src/main/java/com/nextcloud/talk/interfaces/SelectionInterface.kt @@ -22,6 +22,5 @@ package com.nextcloud.talk.interfaces interface SelectionInterface { fun toggleBrowserItemSelection(path: String) - fun isPathSelected(path: String): Boolean } diff --git a/app/src/main/java/com/nextcloud/talk/utils/animations/FABAwareScrollingViewBehavior.java b/app/src/main/java/com/nextcloud/talk/utils/animations/FABAwareScrollingViewBehavior.java deleted file mode 100644 index 3b5264177..000000000 --- a/app/src/main/java/com/nextcloud/talk/utils/animations/FABAwareScrollingViewBehavior.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright 2015 The Android Open Source Project - * - * 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.utils.animations; - -import android.content.Context; -import android.util.AttributeSet; -import android.view.View; - -import androidx.annotation.NonNull; -import androidx.coordinatorlayout.widget.CoordinatorLayout; -import androidx.core.view.ViewCompat; - -import com.google.android.material.appbar.AppBarLayout; -import com.google.android.material.floatingactionbutton.FloatingActionButton; -import com.nextcloud.talk.R; - -import java.util.List; - -public class FABAwareScrollingViewBehavior extends AppBarLayout.ScrollingViewBehavior { - - private boolean slidingDown = false; - private int searchBarHeight; - - public FABAwareScrollingViewBehavior() { - } - - public FABAwareScrollingViewBehavior(Context context, AttributeSet attrs) { - super(context, attrs); - } - - @Override - protected void layoutChild(@NonNull CoordinatorLayout parent, @NonNull View child, int layoutDirection) { - if (child.getId() == R.id.searchCardView) { - searchBarHeight = child.getHeight(); - } - super.layoutChild(parent, child, layoutDirection); - } - - @Override - public boolean layoutDependsOn(CoordinatorLayout parent, View child, View dependency) { - return super.layoutDependsOn(parent, child, dependency) || - dependency instanceof FloatingActionButton; - } - - @Override - public boolean onStartNestedScroll(final CoordinatorLayout coordinatorLayout, final View child, - final View directTargetChild, final View target, final int nestedScrollAxes) { - // Ensure we react to vertical scrolling - return nestedScrollAxes == ViewCompat.SCROLL_AXIS_VERTICAL - || super.onStartNestedScroll(coordinatorLayout, child, directTargetChild, target, - nestedScrollAxes); - } - - @Override - public void onNestedScroll(final CoordinatorLayout coordinatorLayout, final View child, - final View target, final int dxConsumed, final int dyConsumed, - final int dxUnconsumed, final int dyUnconsumed) { - //super.onNestedScroll(coordinatorLayout, child, target, dxConsumed, dyConsumed, dxUnconsumed, - // dyUnconsumed); - if (dyConsumed > 0) { - // User scrolled down -> hide the FAB - List dependencies = coordinatorLayout.getDependencies(child); - for (View view : dependencies) { - if (view instanceof FloatingActionButton) { - ((FloatingActionButton) view).hide(); - } else if (view.getId() == R.id.searchCardView) { - //slideUp(child); - } - } - } else if (dyConsumed < 0) { - // User scrolled up -> show the FAB - List dependencies = coordinatorLayout.getDependencies(child); - for (View view : dependencies) { - if (view instanceof FloatingActionButton) { - ((FloatingActionButton) view).show(); - } else if (view.getId() == R.id.searchCardView) { - //slideDown(view); - } - } - } - } - - private void slideUp(View child) { - if (slidingDown) { - slidingDown = false; - child.clearAnimation(); - child.animate().translationY(0).setDuration(200); - } - } - - private void slideDown(View child) { - if (!slidingDown) { - slidingDown = true; - child.clearAnimation(); - child.animate().translationY(searchBarHeight).setDuration(200); - } - } -} \ No newline at end of file diff --git a/app/src/main/java/com/nextcloud/talk/utils/animations/ViewHidingBehaviourAnimation.java b/app/src/main/java/com/nextcloud/talk/utils/animations/ViewHidingBehaviourAnimation.java deleted file mode 100644 index 117a6872f..000000000 --- a/app/src/main/java/com/nextcloud/talk/utils/animations/ViewHidingBehaviourAnimation.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Nextcloud Talk application - * - * @author Mario Danic - * Copyright (C) 2018 Mario Danic - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * The original code is Copyright (c) 2016 Srijith Narayanan under MIT licence - * https://github.com/sjthn/BottomNavigationViewBehavior/blob/9558104a16a1276bd8a73fba6736d88cd25b5488/app/src/main/java/com/example/srijith/bottomnavigationviewbehavior/BottomNavigationViewBehavior.java - * and of course modified by yours truly. - */ - -package com.nextcloud.talk.utils.animations; - -import android.view.View; - -import androidx.annotation.NonNull; -import androidx.coordinatorlayout.widget.CoordinatorLayout; -import androidx.core.view.ViewCompat; - -import com.google.android.material.appbar.AppBarLayout; - -public class ViewHidingBehaviourAnimation extends AppBarLayout.ScrollingViewBehavior { - - private int height; - private boolean slidingDown = false; - - @Override - public boolean onLayoutChild(CoordinatorLayout parent, View child, int layoutDirection) { - height = child.getHeight(); - return super.onLayoutChild(parent, child, layoutDirection); - } - - @Override - public boolean onStartNestedScroll(@NonNull CoordinatorLayout coordinatorLayout, - @NonNull View child, @NonNull View directTargetChild, @NonNull View - target, int nestedScrollAxes) { - return nestedScrollAxes == ViewCompat.SCROLL_AXIS_VERTICAL; - } - - @Override - public void onNestedScroll(@NonNull CoordinatorLayout coordinatorLayout, @NonNull View child, - @NonNull View target, int dxConsumed, int - dyConsumed, int dxUnconsumed, int dyUnconsumed) { - if (dyConsumed > 0) { - slideDown(child); - } else if (dyConsumed < 0) { - slideUp(child); - } - } - - private void slideUp(View child) { - if (slidingDown) { - slidingDown = false; - child.clearAnimation(); - child.animate().translationY(0).setDuration(200); - } - } - - private void slideDown(View child) { - if (!slidingDown) { - slidingDown = true; - child.clearAnimation(); - child.animate().translationY(height).setDuration(200); - } - } -} diff --git a/app/src/main/java/com/nextcloud/talk/utils/singletons/ApplicationWideMessageHolder.java b/app/src/main/java/com/nextcloud/talk/utils/singletons/ApplicationWideMessageHolder.java deleted file mode 100644 index fe8ea188c..000000000 --- a/app/src/main/java/com/nextcloud/talk/utils/singletons/ApplicationWideMessageHolder.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Nextcloud Talk application - * - * @author Mario Danic - * Copyright (C) 2017-2018 Mario Danic - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.nextcloud.talk.utils.singletons; - -import androidx.annotation.Nullable; - -public class ApplicationWideMessageHolder { - private static final ApplicationWideMessageHolder holder = new ApplicationWideMessageHolder(); - private MessageType messageType; - - public static ApplicationWideMessageHolder getInstance() { - return holder; - } - - public MessageType getMessageType() { - return messageType; - } - - public void setMessageType(@Nullable MessageType messageType) { - this.messageType = messageType; - } - - public enum MessageType { - WRONG_ACCOUNT, ACCOUNT_UPDATED_NOT_ADDED, ACCOUNT_SCHEDULED_FOR_DELETION, SERVER_WITHOUT_TALK, - FAILED_TO_IMPORT_ACCOUNT, ACCOUNT_WAS_IMPORTED, CALL_PASSWORD_WRONG - } -} diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 4bd7ff903..61465a45b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -349,7 +349,7 @@ You were silenced by a moderator Failed to send - tap to retry sending. Preferences - Theme&Sounds + Appearance & Sounds Calls sound Notifications sound