Transfer SmartLengthInputFilter license to Tusky (#1384)
* Transfer SmartLengthInputFilter in-header license Transfer license for file "SmartLengthInputFilter.java" from me (Diego Rossi) to Tusky and therefore also change it from the original Apache 2.0 to currently GPLv3. This was a mistake that has been sitting around for way too long. * Rewrite SmartLengthInputFilter from Java to Kotlin This has been done by hand, without the custom copy-paste tool. * Fix bad references in Java files using SmartLengthInputFilter features * Shorten code in Java classes referencing SmartLengthInputFilter instance * Refactor SmartLengthInputFilter from class to singleton Kotlin object * Move hasBadRatio to become a toplevel function * Patch up all the files affected by SmartLengthInputFilter changes * Length in SmartLengthInputFilter is const 500, simplify code accordingly * More meaningful name for toplevel function for checking trimming ability * Add missing license header
This commit is contained in:
parent
3b1288e99c
commit
87285ae5bf
7 changed files with 118 additions and 167 deletions
|
|
@ -58,10 +58,7 @@ public final class ViewDataUtils {
|
|||
.setApplication(visibleStatus.getApplication())
|
||||
.setStatusEmojis(visibleStatus.getEmojis())
|
||||
.setAccountEmojis(visibleStatus.getAccount().getEmojis())
|
||||
.setCollapsible(!SmartLengthInputFilter.hasBadRatio(
|
||||
visibleStatus.getContent(),
|
||||
SmartLengthInputFilter.LENGTH_DEFAULT
|
||||
))
|
||||
.setCollapsible(!SmartLengthInputFilterKt.shouldTrimStatus(visibleStatus.getContent()))
|
||||
.setCollapsed(true)
|
||||
.setPoll(visibleStatus.getPoll())
|
||||
.setCard(visibleStatus.getCard())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue