Clean and add towncrier
This commit is contained in:
parent
6b10406622
commit
c551cf3058
@ -386,7 +386,4 @@ internal abstract class SessionModule {
|
||||
|
||||
@Binds
|
||||
abstract fun bindEventSenderProcessor(processor: EventSenderProcessorCoroutine): EventSenderProcessor
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
1
newsfragment/3531.feature
Normal file
1
newsfragment/3531.feature
Normal file
@ -0,0 +1 @@
|
||||
Introduces AutoAcceptInvites which can be enabled at compile time.
|
@ -208,7 +208,7 @@ private val autoAcceptInvites: AutoAcceptInvites)
|
||||
val activeSpaceRoomId = groupingMethod.spaceSummary?.roomId
|
||||
var dmInvites = 0
|
||||
var roomsInvite = 0
|
||||
if(!autoAcceptInvites.hideInvites) {
|
||||
if (!autoAcceptInvites.hideInvites) {
|
||||
dmInvites = session.getRoomSummaries(
|
||||
roomSummaryQueryParams {
|
||||
memberships = listOf(Membership.INVITE)
|
||||
|
@ -24,6 +24,6 @@ interface AutoAcceptInvites {
|
||||
}
|
||||
|
||||
class CompileTimeAutoAcceptInvites @Inject constructor() : AutoAcceptInvites {
|
||||
override val isEnabled = true
|
||||
override val hideInvites = false
|
||||
override val isEnabled = false
|
||||
override val hideInvites = isEnabled
|
||||
}
|
||||
|
@ -256,10 +256,10 @@ class NotificationDrawerManager @Inject constructor(private val context: Context
|
||||
}
|
||||
}
|
||||
is InviteNotifiableEvent -> {
|
||||
if(autoAcceptInvites.hideInvites){
|
||||
if (autoAcceptInvites.hideInvites) {
|
||||
// Forget this event
|
||||
eventIterator.remove()
|
||||
}else {
|
||||
} else {
|
||||
invitationEvents.add(event)
|
||||
}
|
||||
}
|
||||
|
@ -121,9 +121,9 @@ class SpacesListViewModel @AssistedInject constructor(@Assisted initialState: Sp
|
||||
.throttleFirst(300, TimeUnit.MILLISECONDS)
|
||||
.observeOn(Schedulers.computation())
|
||||
.subscribe {
|
||||
val inviteCount = if(autoAcceptInvites.hideInvites){
|
||||
val inviteCount = if (autoAcceptInvites.hideInvites) {
|
||||
0
|
||||
}else {
|
||||
} else {
|
||||
session.getRoomSummaries(
|
||||
roomSummaryQueryParams { this.memberships = listOf(Membership.INVITE) }
|
||||
).size
|
||||
|
Loading…
Reference in New Issue
Block a user