Skip to content

Commit cdac03d

Browse files
committed
fix: repair syntax errors in TTSControlsView
1 parent 545347a commit cdac03d

1 file changed

Lines changed: 5 additions & 23 deletions

File tree

app/src/main/java/com/foobnix/tts/TTSControlsView.java

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -364,27 +364,15 @@ protected void onDetachedFromWindow() {
364364
EventBus.getDefault().unregister(this);
365365
handler.removeCallbacksAndMessages(null);
366366
}
367-
@Subscribe(threadMode = ThreadMode.MAIN)
368-
public void onTTSStatus(TtsStatus status) {
369-
if (ttsPlayPause != null) {
370-
handler.removeCallbacksAndMessages(null);
371-
handler.postDelayed(update, 200);
372-
}
373-
}
374367

375-
@Subscribe(threadMode = ThreadMode.MAIN)
376-
public void onTtsPreloadStats(TtsPreloadStats stats) {
377-
if (ttsPreloadStats != null) {
378-
if (com.foobnix.model.AppState.get().ttsPrecomputeLines > 0) {
379-
ttsPreloadStats.setVisibility(View.VISIBLE);
380-
ttsPreloadStats.setText(String.format("Preload Buffer - Pending: %d | Ready: %d | Playing: %d", stats.pending, stats.synthesized, stats.playing));
381-
} else {
382-
ttsPreloadStats.setVisibility(View.GONE);
368+
@Subscribe(threadMode = ThreadMode.MAIN)
369+
public void onTTSStatus(TtsStatus status) {
370+
if (ttsPlayPause != null) {
371+
handler.removeCallbacksAndMessages(null);
372+
handler.postDelayed(update, 200);
383373
}
384374
}
385-
}
386375

387-
public void reset() {
388376
@Subscribe(threadMode = ThreadMode.MAIN)
389377
public void onTtsPreloadStats(TtsPreloadStats stats) {
390378
if (ttsPreloadStats != null) {
@@ -404,9 +392,3 @@ public void reset() {
404392
}
405393

406394
}
407-
Get());
408-
update.run();
409-
410-
}
411-
412-
}

0 commit comments

Comments
 (0)