* remove unnecessary if
`Array.prototype.some` already returns a boolean so an if to return
true or false is completely unnecessary in this case.
* perf: use count instead of find
When using `count` instead of `findOneBy`, the data is not
unnecessarily loaded.
* remove duplicate null check
The variable is checked for null in the lines above and the function
returns if so. Therefore, it can not be null at this point.
* simplify `getJsonSchema`
Because the assigned value is `null` and the used keys are only
shallow, use of `nestedProperty.set` seems inappropriate. Because the
value is not read, the initial for loop can be replaced by a `for..in`
loop.
Since all keys will be assigned `null`, the condition of the ternary
expression in the nested function will always be true. Therefore the
recursion case will never happen. With this the nested function can be
eliminated.
* remove duplicate condition
The code above already checks `dragging` and returns if it is truthy.
Checking it again later is therefore unnecessary.
To make this more obvious the `return` is removed in favour of using
an if...else construct.
* remove impossible "unknown" time
The `ago` variable will always be a number and all non-negative numbers
are already covered by other cases, the negative case is handled with
`future` so there is no case when `unkown` could be achieved.
* Update ja-JP.yml
* Added settable config for muted instances
* added psql query for removal of muted notes
* Added filtering and trimming for instance mutes
* cleaned up filtering of bad instance mutes and added a refresh at the end for the list on the client
* Added notification & streaming timeline muting
* Updated changelog
* Added missing semicolon
* Apply japanese string suggestions from robflop
Co-authored-by: Robin B. <robflop98@outlook.com>
* Changed Ja-JP instance mute title string to one suggested by sousuke
Co-authored-by: sousuke0422 <sousuke20xx@gmail.com>
* Update ja-JP instanceMuteDescription based on sousuke's suggestion
Co-authored-by: sousuke0422 <sousuke20xx@gmail.com>
* added notification mute
* added notification and note children muting
* Fixed a bug where local notifications were getting filtered on cold start
* Fixed instance mute imports
* Fixed not saving/loading instance mutes
* removed en-US translations for instance mute
* moved instance mute migration to js
* changed settings index back to spaces
* removed destructuring assignment from notification stream in instance mute check call
Co-authored-by: tamaina <tamaina@hotmail.co.jp>
* added .note accessor for checking note data instead of notification data
* changed note to use Packed<'Note'> instead of any and removed usage of snake case
Co-authored-by: tamaina <tamaina@hotmail.co.jp>
* changed notification mute check to check specifically for notification host
* changed to using single quotes
* moved @click to the end for the linter
* revert unnecessary changes
* restored newlines
* whitespace removal
Co-authored-by: syuilo <syuilotan@yahoo.co.jp>
Co-authored-by: Robin B. <robflop98@outlook.com>
Co-authored-by: sousuke0422 <sousuke20xx@gmail.com>
Co-authored-by: puffaboo <emilis@jigglypuff.club>
Co-authored-by: tamaina <tamaina@hotmail.co.jp>