From 325dd453aa82b1a30895f37a03ca45f0ddbedabc Mon Sep 17 00:00:00 2001 From: F0x1d Date: Fri, 11 Aug 2023 22:04:30 +0500 Subject: [PATCH] Removed useless files --- .../com/f0x1d/logfox/utils/OneTimeAction.kt | 13 ------------ .../logfox/utils/view/PauseTextWatcher.kt | 21 ------------------- 2 files changed, 34 deletions(-) delete mode 100644 app/src/main/java/com/f0x1d/logfox/utils/OneTimeAction.kt delete mode 100644 app/src/main/java/com/f0x1d/logfox/utils/view/PauseTextWatcher.kt diff --git a/app/src/main/java/com/f0x1d/logfox/utils/OneTimeAction.kt b/app/src/main/java/com/f0x1d/logfox/utils/OneTimeAction.kt deleted file mode 100644 index b205217f..00000000 --- a/app/src/main/java/com/f0x1d/logfox/utils/OneTimeAction.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.f0x1d.logfox.utils - -class OneTimeAction { - - private var done = false - - fun doIfNotDone(action: () -> Unit) { - if (!done) { - action.invoke() - done = true - } - } -} \ No newline at end of file diff --git a/app/src/main/java/com/f0x1d/logfox/utils/view/PauseTextWatcher.kt b/app/src/main/java/com/f0x1d/logfox/utils/view/PauseTextWatcher.kt deleted file mode 100644 index 33c41cbe..00000000 --- a/app/src/main/java/com/f0x1d/logfox/utils/view/PauseTextWatcher.kt +++ /dev/null @@ -1,21 +0,0 @@ -package com.f0x1d.logfox.utils.view - -import android.text.Editable -import android.text.TextWatcher - -class PauseTextWatcher(private val listener: (Editable?) -> Unit): TextWatcher { - - var paused = false - - override fun beforeTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {} - override fun onTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {} - override fun afterTextChanged(editable: Editable?) { - if (!paused) listener.invoke(editable) - } - - fun paused(block: () -> Unit) { - paused = true - block.invoke() - paused = false - } -} \ No newline at end of file