File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
app/src/main/kotlin/org/fossify/filemanager/activities Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ import java.io.File
3434class DecompressActivity : SimpleActivity () {
3535 companion object {
3636 private const val PASSWORD = " password"
37+ var onDecompressFinished: ((String ) -> Unit )? = null
3738 }
3839
3940 private val binding by viewBinding(ActivityDecompressBinding ::inflate)
@@ -193,8 +194,12 @@ class DecompressActivity : SimpleActivity() {
193194 outputFile.setLastModified(entry)
194195 }
195196
196- toast(R .string.decompression_successful)
197- finish()
197+ runOnUiThread {
198+ toast(getString(R .string.decompression_successful))
199+ val extractedFolder = " $destination /${filename.substringBeforeLast(" ." )} "
200+ onDecompressFinished?.invoke(extractedFolder)
201+ finish()
202+ }
198203 }
199204 } catch (e: Exception ) {
200205 showErrorToast(e)
Original file line number Diff line number Diff line change @@ -119,6 +119,10 @@ class MainActivity : SimpleActivity() {
119119 checkIfRootAvailable()
120120 checkInvalidFavorites()
121121 }
122+
123+ DecompressActivity .onDecompressFinished = { extractedFolder ->
124+ openPath(extractedFolder, true )
125+ }
122126 }
123127
124128 override fun onResume () {
You can’t perform that action at this time.
0 commit comments