mirror of
https://codeberg.org/catask-org/catask.git
synced 2025-04-19 21:33:41 -05:00
some fixes
This commit is contained in:
parent
66423b7379
commit
d1d64ab954
4 changed files with 10 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
## 1.5.5
|
||||
|
||||
### Fixes
|
||||
* convert trim value to int
|
||||
* update default config
|
||||
|
||||
## 1.5.4
|
||||
|
||||
### Fixes
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
"tintColors": false,
|
||||
"infoBoxLayout": "column"
|
||||
},
|
||||
"trimContentAfter": "50",
|
||||
"charLimit": "512",
|
||||
"anonName": "Anonymous",
|
||||
"lockInbox": false,
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue