Merge pull request #28 from octoshrimpy/dev/bug/send-sched-reg

Dev/bug/send sched reg
This commit is contained in:
octoshrimpy
2023-11-26 21:33:28 +00:00
committed by GitHub
13 changed files with 83 additions and 132 deletions
+4
View File
@@ -52,3 +52,7 @@ google-services.json
freeline.py freeline.py
freeline/ freeline/
freeline_project_description.json freeline_project_description.json
# secrets
my-release-key.keystore
my-release-key.keystore.base64
+15
View File
@@ -1,4 +1,19 @@
[ [
{
"versionCode": "2221",
"versionName": "4.0.4",
"fixed": [
"Revived!",
"Crash when deleting scheduled messages",
"Crash when searching for only spaces"
],
"removed": [
"Most QKSMS branding",
"Donation on sidebar",
"Help on sidebar"
]
},
{ {
"versionCode": "2220", "versionCode": "2220",
"versionName": "3.10.1", "versionName": "3.10.1",
+2 -2
View File
@@ -30,8 +30,8 @@ android {
applicationId 'dev.octoshrimpy.quik' applicationId 'dev.octoshrimpy.quik'
minSdkVersion 23 minSdkVersion 23
targetSdkVersion 33 targetSdkVersion 33
versionCode 2220 versionCode 2221
versionName "3.10.1" versionName "4.0.4"
setProperty("archivesBaseName", "QKSMS-v${versionName}") setProperty("archivesBaseName", "QKSMS-v${versionName}")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -142,22 +142,22 @@ class Navigator @Inject constructor(
} }
fun showDeveloper() { fun showDeveloper() {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/moezbhatti")) val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/octoshrimpy"))
startActivityExternal(intent) startActivityExternal(intent)
} }
fun showSourceCode() { fun showSourceCode() {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/moezbhatti/qksms")) val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/octoshrimpy/quik"))
startActivityExternal(intent) startActivityExternal(intent)
} }
fun showChangelog() { fun showChangelog() {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/moezbhatti/qksms/releases")) val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/octoshrimpy/quik/releases"))
startActivityExternal(intent) startActivityExternal(intent)
} }
fun showLicense() { fun showLicense() {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/moezbhatti/qksms/blob/master/LICENSE")) val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/octoshrimpy/quik/blob/master/LICENSE"))
startActivityExternal(intent) startActivityExternal(intent)
} }
@@ -240,7 +240,7 @@ class Navigator @Inject constructor(
analyticsManager.track("Clicked Invite") analyticsManager.track("Clicked Invite")
Intent(Intent.ACTION_SEND) Intent(Intent.ACTION_SEND)
.setType("text/plain") .setType("text/plain")
.putExtra(Intent.EXTRA_TEXT, "http://qklabs.com/download") .putExtra(Intent.EXTRA_TEXT, "https://github.com/octoshrimpy/quik/releases/latest")
.let { Intent.createChooser(it, null) } .let { Intent.createChooser(it, null) }
.let(::startActivityExternal) .let(::startActivityExternal)
} }
@@ -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.annotation.CheckResult
import androidx.drawerlayout.widget.DrawerLayout import androidx.drawerlayout.widget.DrawerLayout
import com.jakewharton.rxbinding2.InitialValueObservable import com.jakewharton.rxbinding2.InitialValueObservable
import com.jakewharton.rxbinding2.support.v4.widget.RxDrawerLayout
import io.reactivex.functions.Consumer import io.reactivex.functions.Consumer
/** /**
@@ -101,12 +101,12 @@ class MainActivity : QkThemedActivity(), MainView {
scheduled.clicks().map { NavItem.SCHEDULED }, scheduled.clicks().map { NavItem.SCHEDULED },
blocking.clicks().map { NavItem.BLOCKING }, blocking.clicks().map { NavItem.BLOCKING },
settings.clicks().map { NavItem.SETTINGS }, settings.clicks().map { NavItem.SETTINGS },
plus.clicks().map { NavItem.PLUS }, // plus.clicks().map { NavItem.PLUS },
help.clicks().map { NavItem.HELP }, // help.clicks().map { NavItem.HELP },
invite.clicks().map { NavItem.INVITE })) invite.clicks().map { NavItem.INVITE }))
} }
override val optionsItemIntent: Subject<Int> = PublishSubject.create() override val optionsItemIntent: Subject<Int> = PublishSubject.create()
override val plusBannerIntent by lazy { plusBanner.clicks() } // override val plusBannerIntent by lazy { plusBanner.clicks() }
override val dismissRatingIntent by lazy { rateDismiss.clicks() } override val dismissRatingIntent by lazy { rateDismiss.clicks() }
override val rateIntent by lazy { rateOkay.clicks() } override val rateIntent by lazy { rateOkay.clicks() }
override val conversationsSelectedIntent by lazy { conversationsAdapter.selectionChanges } override val conversationsSelectedIntent by lazy { conversationsAdapter.selectionChanges }
@@ -238,7 +238,7 @@ class MainActivity : QkThemedActivity(), MainView {
listOf(plusBadge1, plusBadge2).forEach { badge -> listOf(plusBadge1, plusBadge2).forEach { badge ->
badge.isVisible = drawerBadgesExperiment.variant && !state.upgraded badge.isVisible = drawerBadgesExperiment.variant && !state.upgraded
} }
plus.isVisible = state.upgraded // plus.isVisible = state.upgraded
plusBanner.isVisible = !state.upgraded plusBanner.isVisible = !state.upgraded
rateLayout.setVisible(state.showRating) rateLayout.setVisible(state.showRating)
@@ -33,7 +33,7 @@ interface MainView : QkView<MainState> {
val homeIntent: Observable<*> val homeIntent: Observable<*>
val navigationIntent: Observable<NavItem> val navigationIntent: Observable<NavItem>
val optionsItemIntent: Observable<Int> val optionsItemIntent: Observable<Int>
val plusBannerIntent: Observable<*> // val plusBannerIntent: Observable<*>
val dismissRatingIntent: Observable<*> val dismissRatingIntent: Observable<*>
val rateIntent: Observable<*> val rateIntent: Observable<*>
val conversationsSelectedIntent: Observable<List<Long>> val conversationsSelectedIntent: Observable<List<Long>>
@@ -294,8 +294,8 @@ class MainViewModel @Inject constructor(
NavItem.SCHEDULED -> navigator.showScheduled() NavItem.SCHEDULED -> navigator.showScheduled()
NavItem.BLOCKING -> navigator.showBlockedConversations() NavItem.BLOCKING -> navigator.showBlockedConversations()
NavItem.SETTINGS -> navigator.showSettings() NavItem.SETTINGS -> navigator.showSettings()
NavItem.PLUS -> navigator.showQksmsPlusActivity("main_menu") // NavItem.PLUS -> navigator.showQksmsPlusActivity("main_menu")
NavItem.HELP -> navigator.showSupport() // NavItem.HELP -> navigator.showSupport()
NavItem.INVITE -> navigator.showInvite() NavItem.INVITE -> navigator.showInvite()
else -> Unit else -> Unit
} }
@@ -399,12 +399,12 @@ class MainViewModel @Inject constructor(
.autoDisposable(view.scope()) .autoDisposable(view.scope())
.subscribe() .subscribe()
view.plusBannerIntent // view.plusBannerIntent
.autoDisposable(view.scope()) // .autoDisposable(view.scope())
.subscribe { // .subscribe {
newState { copy(drawerOpen = false) } // newState { copy(drawerOpen = false) }
navigator.showQksmsPlusActivity("main_banner") // navigator.showQksmsPlusActivity("main_banner")
} // }
view.rateIntent view.rateIntent
.autoDisposable(view.scope()) .autoDisposable(view.scope())
@@ -59,9 +59,9 @@ class PlusViewModel @Inject constructor(
.autoDisposable(view.scope()) .autoDisposable(view.scope())
.subscribe { sku -> view.initiatePurchaseFlow(billingManager, sku) } .subscribe { sku -> view.initiatePurchaseFlow(billingManager, sku) }
view.donateIntent // view.donateIntent
.autoDisposable(view.scope()) // .autoDisposable(view.scope())
.subscribe { navigator.showDonation() } // .subscribe { navigator.showDonation() }
view.themeClicks view.themeClicks
.autoDisposable(view.scope()) .autoDisposable(view.scope())
@@ -218,11 +218,11 @@ class SettingsPresenter @Inject constructor(
view.nightModeSelected() view.nightModeSelected()
.withLatestFrom(billingManager.upgradeStatus) { mode, upgraded -> .withLatestFrom(billingManager.upgradeStatus) { mode, upgraded ->
if (!upgraded && mode == Preferences.NIGHT_MODE_AUTO) { // if (!upgraded && mode == Preferences.NIGHT_MODE_AUTO) {
view.showQksmsPlusSnackbar() // view.showQksmsPlusSnackbar()
} else { // } else {
nightModeManager.updateNightMode(mode) nightModeManager.updateNightMode(mode)
} // }
} }
.autoDisposable(view.scope()) .autoDisposable(view.scope())
.subscribe() .subscribe()
@@ -245,11 +245,11 @@ class SettingsPresenter @Inject constructor(
view.sendDelaySelected() view.sendDelaySelected()
.withLatestFrom(billingManager.upgradeStatus) { duration, upgraded -> .withLatestFrom(billingManager.upgradeStatus) { duration, upgraded ->
if (!upgraded && duration != 0) { // if (!upgraded && duration != 0) {
view.showQksmsPlusSnackbar() // view.showQksmsPlusSnackbar()
} else { // } else {
prefs.sendDelay.set(duration) prefs.sendDelay.set(duration)
} // }
} }
.autoDisposable(view.scope()) .autoDisposable(view.scope())
.subscribe() .subscribe()
@@ -161,35 +161,35 @@
</LinearLayout> </LinearLayout>
<LinearLayout <!-- <LinearLayout-->
android:id="@+id/plus" <!-- android:id="@+id/plus"-->
style="@style/DrawerRow"> <!-- style="@style/DrawerRow">-->
<ImageView <!-- <ImageView-->
style="@style/DrawerIcon" <!-- style="@style/DrawerIcon"-->
android:src="@drawable/ic_star_black_24dp" <!-- android:src="@drawable/ic_star_black_24dp"-->
android:tint="?android:attr/textColorSecondary" /> <!-- android:tint="?android:attr/textColorSecondary" />-->
<dev.octoshrimpy.quik.common.widget.QkTextView <!-- <dev.octoshrimpy.quik.common.widget.QkTextView-->
style="@style/DrawerText" <!-- style="@style/DrawerText"-->
android:text="@string/drawer_plus" /> <!-- android:text="@string/drawer_plus" />-->
</LinearLayout> <!-- </LinearLayout>-->
<LinearLayout <!-- <LinearLayout-->
android:id="@+id/help" <!-- android:id="@+id/help"-->
style="@style/DrawerRow"> <!-- style="@style/DrawerRow">-->
<ImageView <!-- <ImageView-->
style="@style/DrawerIcon" <!-- style="@style/DrawerIcon"-->
android:src="@drawable/ic_help_black_24dp" <!-- android:src="@drawable/ic_help_black_24dp"-->
android:tint="?android:attr/textColorSecondary" /> <!-- android:tint="?android:attr/textColorSecondary" />-->
<dev.octoshrimpy.quik.common.widget.QkTextView <!-- <dev.octoshrimpy.quik.common.widget.QkTextView-->
style="@style/DrawerText" <!-- style="@style/DrawerText"-->
android:text="@string/drawer_help" /> <!-- android:text="@string/drawer_help" />-->
</LinearLayout> <!-- </LinearLayout>-->
<LinearLayout <LinearLayout
android:id="@+id/invite" android:id="@+id/invite"
+10 -10
View File
@@ -30,7 +30,7 @@
<string name="title_theme">Theme</string> <string name="title_theme">Theme</string>
<string name="title_conversations">Search inbox…</string> <string name="title_conversations">Search inbox…</string>
<string name="title_compose">Type a name or number</string> <string name="title_compose">Type a name or number</string>
<string name="title_qksms_plus" translatable="false">QKSMS+</string> <string name="title_qksms_plus" translatable="false">QKSMS+ - deprecated</string>
<string name="setup_skip">Skip</string> <string name="setup_skip">Skip</string>
<string name="setup_next">Continue</string> <string name="setup_next">Continue</string>
@@ -66,9 +66,9 @@
<string name="main_default_sms_message">Make QUIK your default SMS app</string> <string name="main_default_sms_message">Make QUIK your default SMS app</string>
<string name="main_default_sms_change">Change</string> <string name="main_default_sms_change">Change</string>
<string name="main_permission_required">Permission required</string> <string name="main_permission_required">Permission required</string>
<string name="main_permission_sms">QKSMS needs permission to send and view SMS messages</string> <string name="main_permission_sms">QUIK needs permission to send and view SMS messages</string>
<string name="main_permission_contacts">QKSMS needs permission to view your contacts</string> <string name="main_permission_contacts">QUIK needs permission to view your contacts</string>
<string name="main_permission_notifications">QKSMS needs permission to display notifications</string> <string name="main_permission_notifications">QUIK needs permission to display notifications</string>
<string name="main_permission_allow">Allow</string> <string name="main_permission_allow">Allow</string>
<string name="drawer_inbox">Inbox</string> <string name="drawer_inbox">Inbox</string>
@@ -77,10 +77,10 @@
<string name="drawer_blocking">Blocking</string> <string name="drawer_blocking">Blocking</string>
<string name="drawer_more">More</string> <string name="drawer_more">More</string>
<string name="drawer_settings">Settings</string> <string name="drawer_settings">Settings</string>
<string name="drawer_plus" translatable="false">QKSMS+</string> <string name="drawer_plus" translatable="false">QKSMS+ - deprecated</string>
<string name="drawer_help">Help &amp; feedback</string> <string name="drawer_help">Help &amp; feedback</string>
<string name="drawer_invite">Invite friends</string> <string name="drawer_invite">Invite friends</string>
<string name="drawer_plus_banner_title" translatable="false">QKSMS+</string> <string name="drawer_plus_banner_title" translatable="false">QKSMS+ - deprecated</string>
<string name="drawer_plus_banner_summary">Unlock amazing new features, and support development</string> <string name="drawer_plus_banner_summary">Unlock amazing new features, and support development</string>
<string name="rate_title">Enjoying QUIK?</string> <string name="rate_title">Enjoying QUIK?</string>
@@ -381,13 +381,13 @@
<string name="qkreply_menu_view">Open conversation</string> <string name="qkreply_menu_view">Open conversation</string>
<string name="theme_material">Material</string> <string name="theme_material">Material</string>
<string name="theme_plus" translatable="false">QKSMS+</string> <string name="theme_plus" translatable="false">QKSMS+ - deprecated</string>
<string name="theme_hex">HEX</string> <string name="theme_hex">HEX</string>
<string name="theme_apply">Apply</string> <string name="theme_apply">Apply</string>
<string name="about_developer" translatable="false">Moez Bhatti</string> <string name="about_developer" translatable="false">Marcos Jones</string>
<string name="about_source" translatable="false">https://github.com/moezbhatti/qksms</string> <string name="about_source" translatable="false">https://github.com/octoshrimpy/quik</string>
<string name="about_changelog" translatable="false">https://github.com/moezbhatti/qksms/releases</string> <string name="about_changelog" translatable="false">https://github.com/octoshrimpy/quik/releases</string>
<string name="about_contact" translatable="false">moez@qklabs.com</string> <string name="about_contact" translatable="false">moez@qklabs.com</string>
<string name="about_license" translatable="false">GNU General Public License v3.0</string> <string name="about_license" translatable="false">GNU General Public License v3.0</string>
<string name="about_copyright" translatable="false">© 2014–2019</string> <string name="about_copyright" translatable="false">© 2014–2019</string>