fixed display bug when switching between professional and standard without saving in between

This commit is contained in:
Neythen Treloar
2022-02-24 17:23:18 +00:00
parent e572fb5142
commit 9c81db3665
2 changed files with 4 additions and 3 deletions

View File

@@ -143,10 +143,11 @@ def index():
def save_displaying(input_settings):
#print('save')
global professional
print('save_displaying_input:', input_settings)
all_settings = ['Stocks', 'Crypto', 'Forex', 'Current Weather', 'Daily Forecast', 'News', 'Sports (Upcoming Games)', 'Sports (Past Games)',
'Sports (Live Games)', 'Sports (Team Stats)', 'Custom Images', 'Custom GIFs', 'Custom Messages']
professional = len(input_settings) == 2
if professional:
all_settings = ['Stocks', 'Crypto', 'Forex', 'Current Weather', 'News']
@@ -155,7 +156,7 @@ def save_displaying(input_settings):
display_settings = []
if professional:
input_settings = [[]]*2
input_settings[0] = [i for i in input_settings[0] if i in all_settings]
input_settings[1] = [i for i in input_settings[1] if i in all_settings]