Hello Community,
I'm working on an employee time tracker app that records the check-in, checkout, break-in, and breakout time of employees and is connected with a sharepoint list. The issue is whenever the app is closed or refreshed, the buttons reset to the pre-defined conditions I coded in power apps.
Global Variable on OnStart:
Set(checkin_pressed,false)
checkinbtn:
onselect: patch(); set(checkin_pressed,true)
DisplayMode: If(checkin_pressed,DisplayMode.Disabled,Edit)
checkoutbtn:
onselect: patch(); set(checkin_pressed,false)
DisplayMode: If(!checkin_pressed,DisplayMode.Disabled,Edit)

Every time I close the app and start or refresh it again check-in is enabled and checkout is disabled.
I want it if the user clicked on the check-in button and closes the app. The next time when the app is opened, it should remember check-in was pressed(it will be disabled) and only shows the checkout button. I'm new to power apps please help me on this matter.