Merge pull request #391 from LizardWithHat/Hide_otp_card_on_screen_off

Workaround: Hide otp card on screen off (#264)
This commit is contained in:
Jakob Nixdorf 2019-10-29 15:27:33 +01:00 committed by GitHub
commit 75cf887bba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -330,11 +330,22 @@ public class MainActivity extends BaseActivity
setFilterString(this.filterString);
}
View cardList = findViewById(R.id.cardList);
if(cardList.getVisibility() == View.INVISIBLE)
cardList.setVisibility(View.VISIBLE);
startUpdater();
}
@Override
public void onPause() {
if(settings.getAuthMethod() == AuthMethod.DEVICE)
runOnUiThread(new Runnable() {
@Override
public void run() {
findViewById(R.id.cardList).setVisibility(View.INVISIBLE);
}
});
super.onPause();
stopUpdater();
}