From 1321d1e20fd20a531b11f213838bbfdfd03b6fa8 Mon Sep 17 00:00:00 2001 From: Soeren Wegener Date: Sun, 15 Dec 2024 18:40:09 +0100 Subject: [PATCH] Show "Trinken" button when scanning first and then selecting username --- drinks_touch/screens/profile.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drinks_touch/screens/profile.py b/drinks_touch/screens/profile.py index 7f2b0500..1cb7ed3a 100644 --- a/drinks_touch/screens/profile.py +++ b/drinks_touch/screens/profile.py @@ -156,6 +156,8 @@ def on_start(self, *args, **kwargs): ] ) + if drink: + self.objects.extend([self.zuordnen, self.drink_info]) return self.elements_aufladungen = [ @@ -164,9 +166,9 @@ def on_start(self, *args, **kwargs): self.btn_aufladen, ] self.elements_drinks = [self.label_verbrauch, self.btn_abbrechen] - if drink: - self.elements_drinks.extend([self.zuordnen, self.drink_info]) - else: + # if drink: + # self.elements_drinks.extend([self.zuordnen, self.drink_info]) + if not drink: self.elements_drinks.append(self.btn_aufladungen) drinks = self.get_stats(limit=12)