blonsky95 / TimeStopperAndroid

0 stars 0 forks source link

bug - free daily timing feature unusable if reattempt of selecting new video #42

Open blonsky95 opened 3 years ago

blonsky95 commented 3 years ago

If you press start, you get the dialog to confirm use of trial, then you confirm. When you are here, if you go to select a new video, and then without selecting video, press back button it no longers lets you use the timing feature controls

blonsky95 commented 3 years ago

Trying this - code to updateFreeTrialInfo is inside the resultOK condition

    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
    if (resultCode == RESULT_OK) {

        //if user has succesfully changed clip, check if the trial was active to count that video as used
        updateFreeTrialInfo()
        //initialise the timesplits controller to reset data from previous video
        timeSplitsController = TimeSplitsController()

        //UI
        hideStartFragment()
        toggleTimingContainerVisibility(false)

        prepareVideoSource(MediaItem.fromUri(data!!.data!!))
        configureExoPlayerButtons(data.data!!)
    }
    super.onActivityResult(requestCode, resultCode, data)
    }