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