forked from upstream-mirrors/quik
added feature to speak messages aloud via system TTS service. added "Speak" option to message swipe left/right options. swipe inbox message to read aloud. swipe again to interrupt. added widget that speaks unseen messages and marks messages as seen after reading them. needs string translations for settings_swipe_actions (new item "Speak") and speak_no_messages and speak_unseen_messages
This commit is contained in:
@@ -25,6 +25,7 @@ import android.content.BroadcastReceiver
|
||||
import androidx.core.provider.FontRequest
|
||||
import androidx.emoji.text.EmojiCompat
|
||||
import androidx.emoji.text.FontRequestEmojiCompatConfig
|
||||
import com.moez.QKSMS.manager.SpeakManager
|
||||
import dev.octoshrimpy.quik.R
|
||||
import dev.octoshrimpy.quik.common.util.CrashlyticsTree
|
||||
import dev.octoshrimpy.quik.common.util.FileLoggingTree
|
||||
@@ -43,6 +44,7 @@ import dagger.android.DispatchingAndroidInjector
|
||||
import dagger.android.HasActivityInjector
|
||||
import dagger.android.HasBroadcastReceiverInjector
|
||||
import dagger.android.HasServiceInjector
|
||||
import dev.octoshrimpy.quik.interactor.SpeakThreads
|
||||
import io.realm.Realm
|
||||
import io.realm.RealmConfiguration
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
@@ -73,6 +75,12 @@ class QKApplication : Application(), HasActivityInjector, HasBroadcastReceiverIn
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
|
||||
// set application context for SpeakManager
|
||||
SpeakManager.setContext(this)
|
||||
|
||||
// set translated "no messages" string for speakThreads interactor
|
||||
SpeakThreads.setNoMessagesString(getString(R.string.speak_no_messages))
|
||||
|
||||
AppComponentManager.init(this)
|
||||
appComponent.inject(this)
|
||||
|
||||
|
||||
@@ -153,7 +153,6 @@ class TextViewStyler @Inject constructor(
|
||||
Preferences.TEXT_SIZE_NORMAL -> 16f
|
||||
Preferences.TEXT_SIZE_LARGE -> 18f
|
||||
Preferences.TEXT_SIZE_LARGER -> 20f
|
||||
Preferences.TEXT_SIZE_SUPER -> 40f
|
||||
else -> 16f
|
||||
}
|
||||
|
||||
@@ -162,7 +161,6 @@ class TextViewStyler @Inject constructor(
|
||||
Preferences.TEXT_SIZE_NORMAL -> 14f
|
||||
Preferences.TEXT_SIZE_LARGE -> 16f
|
||||
Preferences.TEXT_SIZE_LARGER -> 18f
|
||||
Preferences.TEXT_SIZE_SUPER -> 36f
|
||||
else -> 14f
|
||||
}
|
||||
|
||||
@@ -171,7 +169,6 @@ class TextViewStyler @Inject constructor(
|
||||
Preferences.TEXT_SIZE_NORMAL -> 12f
|
||||
Preferences.TEXT_SIZE_LARGE -> 14f
|
||||
Preferences.TEXT_SIZE_LARGER -> 16f
|
||||
Preferences.TEXT_SIZE_SUPER -> 32f
|
||||
else -> 12f
|
||||
}
|
||||
|
||||
@@ -180,7 +177,6 @@ class TextViewStyler @Inject constructor(
|
||||
Preferences.TEXT_SIZE_NORMAL -> 20f
|
||||
Preferences.TEXT_SIZE_LARGE -> 22f
|
||||
Preferences.TEXT_SIZE_LARGER -> 26f
|
||||
Preferences.TEXT_SIZE_SUPER -> 52f
|
||||
else -> 20f
|
||||
}
|
||||
|
||||
@@ -189,7 +185,6 @@ class TextViewStyler @Inject constructor(
|
||||
Preferences.TEXT_SIZE_NORMAL -> 18f
|
||||
Preferences.TEXT_SIZE_LARGE -> 20f
|
||||
Preferences.TEXT_SIZE_LARGER -> 24f
|
||||
Preferences.TEXT_SIZE_SUPER -> 48f
|
||||
else -> 18f
|
||||
}
|
||||
|
||||
@@ -198,7 +193,6 @@ class TextViewStyler @Inject constructor(
|
||||
Preferences.TEXT_SIZE_NORMAL -> 32f
|
||||
Preferences.TEXT_SIZE_LARGE -> 36f
|
||||
Preferences.TEXT_SIZE_LARGER -> 40f
|
||||
Preferences.TEXT_SIZE_SUPER -> 80f
|
||||
else -> 32f
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user