From d37280a30cd333e4524ca332358975148db944d2 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 10 Sep 2019 19:12:50 +0800 Subject: [PATCH] up --- .../ui/readbook/config/PaddingConfigDialog.kt | 16 ++++------------ .../app/ui/readbook/config/ReadAloudDialog.kt | 6 ++---- .../app/ui/readbook/config/ReadStyleDialog.kt | 6 +++--- 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/readbook/config/PaddingConfigDialog.kt b/app/src/main/java/io/legado/app/ui/readbook/config/PaddingConfigDialog.kt index 779ba3dab..4d349b9cb 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/config/PaddingConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/readbook/config/PaddingConfigDialog.kt @@ -116,9 +116,7 @@ class PaddingConfigDialog : DialogFragment() { tv_padding_top.text = paddingTop.toString() } - override fun onStartTrackingTouch(seekBar: SeekBar?) { - - } + override fun onStartTrackingTouch(seekBar: SeekBar?) = Unit override fun onStopTrackingTouch(seekBar: SeekBar?) { postEvent(Bus.UP_CONFIG, true) @@ -130,9 +128,7 @@ class PaddingConfigDialog : DialogFragment() { tv_padding_bottom.text = paddingBottom.toString() } - override fun onStartTrackingTouch(seekBar: SeekBar?) { - - } + override fun onStartTrackingTouch(seekBar: SeekBar?) = Unit override fun onStopTrackingTouch(seekBar: SeekBar?) { postEvent(Bus.UP_CONFIG, true) @@ -144,9 +140,7 @@ class PaddingConfigDialog : DialogFragment() { tv_padding_left.text = paddingLeft.toString() } - override fun onStartTrackingTouch(seekBar: SeekBar?) { - - } + override fun onStartTrackingTouch(seekBar: SeekBar?) = Unit override fun onStopTrackingTouch(seekBar: SeekBar?) { postEvent(Bus.UP_CONFIG, true) @@ -158,9 +152,7 @@ class PaddingConfigDialog : DialogFragment() { tv_padding_right.text = paddingRight.toString() } - override fun onStartTrackingTouch(seekBar: SeekBar?) { - - } + override fun onStartTrackingTouch(seekBar: SeekBar?) = Unit override fun onStopTrackingTouch(seekBar: SeekBar?) { postEvent(Bus.UP_CONFIG, true) diff --git a/app/src/main/java/io/legado/app/ui/readbook/config/ReadAloudDialog.kt b/app/src/main/java/io/legado/app/ui/readbook/config/ReadAloudDialog.kt index 3922ee122..686c0e7b5 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/config/ReadAloudDialog.kt +++ b/app/src/main/java/io/legado/app/ui/readbook/config/ReadAloudDialog.kt @@ -87,8 +87,7 @@ class ReadAloudDialog : DialogFragment() { override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) { } - override fun onStartTrackingTouch(seekBar: SeekBar?) { - } + override fun onStartTrackingTouch(seekBar: SeekBar?) = Unit override fun onStopTrackingTouch(seekBar: SeekBar?) { requireContext().putPrefInt("ttsSpeechRate", seek_tts_SpeechRate.progress) @@ -101,8 +100,7 @@ class ReadAloudDialog : DialogFragment() { tv_timer.text = requireContext().getString(R.string.timer_m, progress) } - override fun onStartTrackingTouch(seekBar: SeekBar?) { - } + override fun onStartTrackingTouch(seekBar: SeekBar?) = Unit override fun onStopTrackingTouch(seekBar: SeekBar?) { ReadAloudService.setTimer(requireContext(), seek_timer.progress) diff --git a/app/src/main/java/io/legado/app/ui/readbook/config/ReadStyleDialog.kt b/app/src/main/java/io/legado/app/ui/readbook/config/ReadStyleDialog.kt index 6232ae321..a0080036c 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/config/ReadStyleDialog.kt +++ b/app/src/main/java/io/legado/app/ui/readbook/config/ReadStyleDialog.kt @@ -119,7 +119,7 @@ class ReadStyleDialog : DialogFragment() { tv_text_size.text = ReadBookConfig.getConfig().textSize.toString() } - override fun onStartTrackingTouch(seekBar: SeekBar?) {} + override fun onStartTrackingTouch(seekBar: SeekBar?) = Unit override fun onStopTrackingTouch(seekBar: SeekBar?) { postEvent(Bus.UP_CONFIG, true) } @@ -151,7 +151,7 @@ class ReadStyleDialog : DialogFragment() { } } - override fun onStartTrackingTouch(seekBar: SeekBar?) {} + override fun onStartTrackingTouch(seekBar: SeekBar?) = Unit override fun onStopTrackingTouch(seekBar: SeekBar?) { postEvent(Bus.UP_CONFIG, true) } @@ -181,7 +181,7 @@ class ReadStyleDialog : DialogFragment() { } } - override fun onStartTrackingTouch(seekBar: SeekBar?) {} + override fun onStartTrackingTouch(seekBar: SeekBar?) = Unit override fun onStopTrackingTouch(seekBar: SeekBar?) { postEvent(Bus.UP_CONFIG, true) }