mirror of
https://codeberg.org/catask-org/catask.git
synced 2025-04-20 13:53:42 -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
|
## 1.5.4
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
"tintColors": false,
|
"tintColors": false,
|
||||||
"infoBoxLayout": "column"
|
"infoBoxLayout": "column"
|
||||||
},
|
},
|
||||||
|
"trimContentAfter": "50",
|
||||||
"charLimit": "512",
|
"charLimit": "512",
|
||||||
"anonName": "Anonymous",
|
"anonName": "Anonymous",
|
||||||
"lockInbox": false,
|
"lockInbox": false,
|
||||||
|
|
|
@ -5,6 +5,6 @@ blacklistFile = 'word_blacklist.txt'
|
||||||
configFile = 'config.json'
|
configFile = 'config.json'
|
||||||
faviconDir = Path.cwd() / 'static' / 'icons' / 'favicon'
|
faviconDir = Path.cwd() / 'static' / 'icons' / 'favicon'
|
||||||
appName = 'CatAsk'
|
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
|
# id (identifier) is to be interpreted as described in https://semver.org/#spec-item-9
|
||||||
version_id = '-alpha'
|
version_id = '-alpha'
|
||||||
|
|
|
@ -100,7 +100,8 @@ def getRandomWord():
|
||||||
return random.choice(items)
|
return random.choice(items)
|
||||||
|
|
||||||
def trimContent(var, trim):
|
def trimContent(var, trim):
|
||||||
if int(trim) > 0:
|
trim = int(trim)
|
||||||
|
if trim > 0:
|
||||||
trimmed = var[:trim] + '…' if len(var) >= trim else var
|
trimmed = var[:trim] + '…' if len(var) >= trim else var
|
||||||
trimmed = trimmed.rstrip()
|
trimmed = trimmed.rstrip()
|
||||||
return trimmed
|
return trimmed
|
||||||
|
|
Loading…
Add table
Reference in a new issue