Skip to content

Commit

Permalink
fix codacy n1
Browse files Browse the repository at this point in the history
  • Loading branch information
pazos committed Oct 18, 2020
1 parent 05fd36e commit 6c2a2ca
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
7 changes: 3 additions & 4 deletions app/src/org/koreader/launcher/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,15 @@ class MainActivity : NativeActivity(), JNILuaInterface,
/* Called when the activity is first created. */
override fun onCreate(savedInstanceState: Bundle?) {
Logger.v(TAG_MAIN, "onCreate()")
timeout = TimeoutHelper(this@MainActivity)
clipboard = ClipboardHelper(this@MainActivity)
device = DeviceHelper(this@MainActivity)
timeout = TimeoutHelper(this@MainActivity)
super.onCreate(savedInstanceState)
setTheme(R.style.Fullscreen)

// Window background must be black for vertical and horizontal lines to be visible
window.setBackgroundDrawableResource(android.R.color.black)

clipboard = ClipboardHelper(this@MainActivity)


if (device.needsView) {
Logger.v(TAG_MAIN, "onNativeSurfaceViewImpl()")
view = NativeSurfaceView(this)
Expand Down
1 change: 0 additions & 1 deletion app/src/org/koreader/launcher/helpers/ClipboardHelper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import android.content.ClipboardManager
import org.koreader.launcher.utils.Logger
import java.util.concurrent.CountDownLatch


class ClipboardHelper(activity: Activity) {

private var clipboard: ClipboardManager = activity.applicationContext.getSystemService(Context.CLIPBOARD_SERVICE)
Expand Down
2 changes: 1 addition & 1 deletion app/src/org/koreader/launcher/helpers/TimeoutHelper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class TimeoutHelper(activity: Activity) {

private fun toMin(ms: Int): Int {
return when {
ms > 0 -> ms/(1000 * 60)
ms > 0 -> ms / (1000 * 60)
else -> 0
}
}
Expand Down
2 changes: 1 addition & 1 deletion detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ complexity:
includeStaticDeclarations: false
ComplexMethod:
active: true
threshold: 15
threshold: 25
ignoreSingleWhenExpression: false
ignoreSimpleWhenEntries: false
LabeledExpression:
Expand Down

0 comments on commit 6c2a2ca

Please sign in to comment.