~oppen/latt

ecad05999ef80c4562470e8e649cf8d1be80a352 — Öppen 15 days ago 702eaf5 trunk
move brightness check to startup so less disruptive when image loads
1 files changed, 5 insertions(+), 0 deletions(-)

M app/src/main/java/oppen/filters/ui/FilterActivity.kt
M app/src/main/java/oppen/filters/ui/FilterActivity.kt => app/src/main/java/oppen/filters/ui/FilterActivity.kt +5 -0
@@ 157,6 157,8 @@ class FilterActivity : AppCompatActivity(), FilterView {
        }

        handleIntent(intent)

        checkBrightness()
    }

    override fun onResume() {


@@ 225,7 227,9 @@ class FilterActivity : AppCompatActivity(), FilterView {
        loading_layout.hide()
        filter_layout.show()
        preview_image.setImageURI(previewUri)
    }

    private fun checkBrightness(){
        val screenBrightness = Settings.System.getInt(contentResolver, Settings.System.SCREEN_BRIGHTNESS,-1)
        if(screenBrightness < 255 && showBrightnessWarning) {
            showBrightnessWarning = false


@@ 241,6 245,7 @@ class FilterActivity : AppCompatActivity(), FilterView {
        }
    }


    override fun imageExported(uri: Uri) = runOnUiThread{
        loading_layout.hide()
        val shareIntent: Intent = Intent().apply {