Skip to content

Commit

Permalink
refactor: 移除无用文件
Browse files Browse the repository at this point in the history
  • Loading branch information
jing332 committed Aug 28, 2023
1 parent d89fd27 commit 5962669
Show file tree
Hide file tree
Showing 33 changed files with 32 additions and 1,815 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import androidx.core.content.pm.ShortcutInfoCompat
import androidx.core.content.pm.ShortcutManagerCompat
import androidx.core.graphics.drawable.IconCompat
import com.github.jing332.tts_server_android.compose.systts.plugin.PluginManagerActivity
import com.github.jing332.tts_server_android.compose.systts.speechrule.SpeechRuleManagerActivity
import com.github.jing332.tts_server_android.ui.forwarder.MsForwarderSwitchActivity
import com.github.jing332.tts_server_android.ui.forwarder.SystemForwarderSwitchActivity
import com.github.jing332.tts_server_android.ui.systts.replace.ReplaceManagerActivity
import com.github.jing332.tts_server_android.ui.systts.speech_rule.SpeechRuleManagerActivity

object ShortCuts {
private inline fun <reified T> buildIntent(context: Context): Intent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import android.content.Context
import android.content.Intent
import com.github.jing332.tts_server_android.R
import com.github.jing332.tts_server_android.ui.base.import1.BaseImportConfigBottomSheetFragment
import com.github.jing332.tts_server_android.ui.systts.plugin.PluginManagerActivity
import com.github.jing332.tts_server_android.ui.systts.speech_rule.SpeechRuleManagerActivity

object ImportConfigFactory {
private const val ID_LIST = "list"
Expand All @@ -27,9 +25,9 @@ object ImportConfigFactory {
fun createFragment(type: String): BaseImportConfigBottomSheetFragment? {
return when (type) {
ID_LIST -> com.github.jing332.tts_server_android.ui.systts.list.ImportConfigBottomSheetFragment()
ID_PLUGIN -> com.github.jing332.tts_server_android.ui.systts.plugin.ImportBottomSheetFragment()
// ID_PLUGIN -> com.github.jing332.tts_server_android.ui.systts.plugin.ImportBottomSheetFragment()
ID_REPLACE_RULE -> com.github.jing332.tts_server_android.ui.systts.replace.ImportConfigBottomSheetFragment()
ID_SPEECH_RULE -> com.github.jing332.tts_server_android.ui.systts.speech_rule.ImportConfigBottomSheetFragment()
// ID_SPEECH_RULE -> com.github.jing332.tts_server_android.ui.systts.speech_rule.ImportConfigBottomSheetFragment()
else -> null
}
}
Expand All @@ -38,20 +36,20 @@ object ImportConfigFactory {
* @return 是否识别成功
*/
fun Context.newEditorFromJS(js: String): Boolean {
if (js.contains("PluginJS")) {
startActivity(Intent(this, PluginManagerActivity::class.java).apply {
flags = Intent.FLAG_ACTIVITY_NEW_TASK
putExtra("js", js)
})

} else if (js.contains("SpeechRuleJS")) {
startActivity(Intent(this, SpeechRuleManagerActivity::class.java).apply {
flags = Intent.FLAG_ACTIVITY_NEW_TASK
putExtra("js", js)
})
} else
// if (js.contains("PluginJS")) {
// startActivity(Intent(this, PluginManagerActivity::class.java).apply {
// flags = Intent.FLAG_ACTIVITY_NEW_TASK
// putExtra("js", js)
// })
//
// } else if (js.contains("SpeechRuleJS")) {
// startActivity(Intent(this, SpeechRuleManagerActivity::class.java).apply {
// flags = Intent.FLAG_ACTIVITY_NEW_TASK
// putExtra("js", js)
// })
// } else
return false

return true
// return true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -248,17 +248,17 @@ abstract class BaseScriptEditorActivity :
.setPositiveButton(R.string.cancel, null)
.show()
}

R.id.menu_set_sample_text -> {
AppDialogs.displayInputDialog(
this,
getString(R.string.set_sample_text_param),
getString(R.string.audition_text),
PluginConfig.sampleText
) {
PluginConfig.sampleText = it
}
}
//
// R.id.menu_set_sample_text -> {
// AppDialogs.displayInputDialog(
// this,
// getString(R.string.set_sample_text_param),
// getString(R.string.audition_text),
// PluginConfig.sampleText
// ) {
// PluginConfig.sampleText = it
// }
// }

R.id.menu_save_as_file -> saveAsFile()
R.id.menu_save -> {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 5962669

Please sign in to comment.