some fixes

This commit is contained in:
mst 2024-09-28 12:51:03 +03:00
parent 66423b7379
commit d1d64ab954
4 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,9 @@
## 1.5.5
### Fixes
* convert trim value to int
* update default config
## 1.5.4
### Fixes

View file

@ -15,6 +15,7 @@
"tintColors": false,
"infoBoxLayout": "column"
},
"trimContentAfter": "50",
"charLimit": "512",
"anonName": "Anonymous",
"lockInbox": false,

View file

@ -5,6 +5,6 @@ blacklistFile = 'word_blacklist.txt'
configFile = 'config.json'
faviconDir = Path.cwd() / 'static' / 'icons' / 'favicon'
appName = 'CatAsk'
version = '1.5.4'
version = '1.5.5'
# id (identifier) is to be interpreted as described in https://semver.org/#spec-item-9
version_id = '-alpha'

View file

@ -100,7 +100,8 @@ def getRandomWord():
return random.choice(items)
def trimContent(var, trim):
if int(trim) > 0:
trim = int(trim)
if trim > 0:
trimmed = var[:trim] + '' if len(var) >= trim else var
trimmed = trimmed.rstrip()
return trimmed