summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmaan Bhojwani <me@armaanb.net>2021-02-14 10:22:11 -0500
committerArmaan Bhojwani <me@armaanb.net>2021-02-14 10:22:11 -0500
commitb43e50be2267001cd085bc5cd1be01a59a5eddea (patch)
tree98f192a8dabb65f516f59a94118f60c45c42de94
parent585e44531389f44e34bf76b674719b6a897282ba (diff)
downloadlightcards-b43e50be2267001cd085bc5cd1be01a59a5eddea.tar.gz
Fix sidebar showing wrong side of card
-rw-r--r--lightcards/deck.py8
-rw-r--r--lightcards/display.py2
2 files changed, 5 insertions, 5 deletions
diff --git a/lightcards/deck.py b/lightcards/deck.py
index 823946f..029694e 100644
--- a/lightcards/deck.py
+++ b/lightcards/deck.py
@@ -36,11 +36,11 @@ class Card:
else:
return "Not starred"
- def get(self):
- if self.side == 0:
- return (self.front, self.back)
- else:
+ def get(self, smart=True):
+ if self.side == 1 and smart:
return (self.back, self.front)
+ else:
+ return (self.front, self.back)
def flip(self):
if self.side == 0:
diff --git a/lightcards/display.py b/lightcards/display.py
index 1c17a75..3931e3f 100644
--- a/lightcards/display.py
+++ b/lightcards/display.py
@@ -553,7 +553,7 @@ class Display:
nstarred = self.nstarred()
for i, card in enumerate(nstarred):
- term = card.get()[self.obj.side]
+ term = card.get(smart=False)[0]
if len(term) > 18:
term = term[:18] + "…"