forked from upstream-mirrors/quik
late night changes
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
[
|
||||
{
|
||||
"versionCode": "2221",
|
||||
"versionName": "4.0.0",
|
||||
"versionName": "4.0.4",
|
||||
"fixed": [
|
||||
"Revived!",
|
||||
"Crash when deleting scheduled messages",
|
||||
|
||||
@@ -31,7 +31,7 @@ android {
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 33
|
||||
versionCode 2221
|
||||
versionName "4.0.0"
|
||||
versionName "4.0.4"
|
||||
setProperty("archivesBaseName", "QKSMS-v${versionName}")
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com>
|
||||
*
|
||||
* This file is part of QKSMS.
|
||||
*
|
||||
* QKSMS 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.
|
||||
*
|
||||
* QKSMS 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 QKSMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package dev.octoshrimpy.quik.common.androidxcompat;
|
||||
|
||||
import androidx.annotation.CheckResult;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
import com.jakewharton.rxbinding2.InitialValueObservable;
|
||||
import io.reactivex.functions.Consumer;
|
||||
|
||||
import static com.jakewharton.rxbinding2.internal.Preconditions.checkNotNull;
|
||||
|
||||
public final class RxDrawerLayout {
|
||||
/**
|
||||
* Create an observable of the open state of the drawer of {@code view}.
|
||||
* <p>
|
||||
* <em>Warning:</em> The created observable keeps a strong reference to {@code view}. Unsubscribe
|
||||
* to free this reference.
|
||||
* <p>
|
||||
* <em>Note:</em> A value will be emitted immediately on subscribe.
|
||||
*/
|
||||
@CheckResult
|
||||
@NonNull
|
||||
public static InitialValueObservable<Boolean> drawerOpen(
|
||||
@NonNull DrawerLayout view, int gravity) {
|
||||
checkNotNull(view, "view == null");
|
||||
return new DrawerLayoutDrawerOpenedObservable(view, gravity);
|
||||
}
|
||||
|
||||
/**
|
||||
* An action which sets whether the drawer with {@code gravity} of {@code view} is open.
|
||||
* <p>
|
||||
* <em>Warning:</em> The created observable keeps a strong reference to {@code view}. Unsubscribe
|
||||
* to free this reference.
|
||||
*/
|
||||
@CheckResult @NonNull public static Consumer<? super Boolean> open(
|
||||
@NonNull final DrawerLayout view, final int gravity) {
|
||||
checkNotNull(view, "view == null");
|
||||
return new Consumer<Boolean>() {
|
||||
@Override public void accept(Boolean aBoolean) {
|
||||
if (aBoolean) {
|
||||
view.openDrawer(gravity);
|
||||
} else {
|
||||
view.closeDrawer(gravity);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private RxDrawerLayout() {
|
||||
throw new AssertionError("No instances.");
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@ package dev.octoshrimpy.quik.common.androidxcompat
|
||||
import androidx.annotation.CheckResult
|
||||
import androidx.drawerlayout.widget.DrawerLayout
|
||||
import com.jakewharton.rxbinding2.InitialValueObservable
|
||||
import com.jakewharton.rxbinding2.support.v4.widget.RxDrawerLayout
|
||||
import io.reactivex.functions.Consumer
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user