kopia lustrzana https://github.com/vitorpamplona/amethyst
change equality test of Mute list to regular expression
rodzic
ac0fbc7435
commit
071df0b6d3
|
@ -13,12 +13,14 @@ import com.vitorpamplona.quartz.utils.TimeUtils
|
|||
|
||||
class HomeConversationsFeedFilter(val account: Account) : AdditiveFeedFilter<Note>() {
|
||||
|
||||
private val regex = ("30000:[a-f0-9]+:" + PeopleListEvent.blockList).toRegex(RegexOption.IGNORE_CASE)
|
||||
|
||||
override fun feedKey(): String {
|
||||
return account.userProfile().pubkeyHex + "-" + account.defaultHomeFollowList
|
||||
}
|
||||
|
||||
override fun showHiddenKey(): Boolean {
|
||||
return account.defaultHomeFollowList.endsWith(PeopleListEvent.blockList)
|
||||
return regex.matches(account.defaultHomeFollowList)
|
||||
}
|
||||
|
||||
override fun feed(): List<Note> {
|
||||
|
|
|
@ -17,12 +17,15 @@ import com.vitorpamplona.quartz.events.TextNoteEvent
|
|||
import com.vitorpamplona.quartz.utils.TimeUtils
|
||||
|
||||
class HomeNewThreadFeedFilter(val account: Account) : AdditiveFeedFilter<Note>() {
|
||||
|
||||
private val regex = ("30000:[a-f0-9]+:" + PeopleListEvent.blockList).toRegex(RegexOption.IGNORE_CASE)
|
||||
|
||||
override fun feedKey(): String {
|
||||
return account.userProfile().pubkeyHex + "-" + account.defaultHomeFollowList
|
||||
}
|
||||
|
||||
override fun showHiddenKey(): Boolean {
|
||||
return account.defaultHomeFollowList.endsWith(PeopleListEvent.blockList)
|
||||
return regex.matches(account.defaultHomeFollowList)
|
||||
}
|
||||
|
||||
override fun feed(): List<Note> {
|
||||
|
|
Ładowanie…
Reference in New Issue