Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 721273dd authored by cketti's avatar cketti Committed by GitHub
Browse files

Merge pull request #5941 from k9mail/update_build_tools

Update build tools
parents 64e46e27 e24d51a4
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ internal data class NotificationData(
    val isSingleMessageNotification: Boolean
        get() = activeNotifications.size == 1

    @OptIn(ExperimentalStdlibApi::class)
    val messageReferences: List<MessageReference>
        get() {
            return buildList(capacity = newMessagesCount) {
+0 −2
Original line number Diff line number Diff line
@@ -41,7 +41,6 @@ internal class SingleMessageNotificationDataCreator {
        )
    }

    @OptIn(ExperimentalStdlibApi::class)
    private fun createSingleNotificationActions(): List<NotificationAction> {
        return buildList {
            add(NotificationAction.Reply)
@@ -53,7 +52,6 @@ internal class SingleMessageNotificationDataCreator {
        }
    }

    @OptIn(ExperimentalStdlibApi::class)
    private fun createSingleNotificationWearActions(account: Account): List<WearNotificationAction> {
        return buildList {
            add(WearNotificationAction.Reply)
+0 −2
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ internal class SummaryNotificationDataCreator(
        )
    }

    @OptIn(ExperimentalStdlibApi::class)
    private fun createSummaryNotificationActions(): List<SummaryNotificationAction> {
        return buildList {
            add(SummaryNotificationAction.MarkAsRead)
@@ -54,7 +53,6 @@ internal class SummaryNotificationDataCreator(
        }
    }

    @OptIn(ExperimentalStdlibApi::class)
    private fun createSummaryWearNotificationActions(account: Account): List<SummaryWearNotificationAction> {
        return buildList {
            add(SummaryWearNotificationAction.MarkAsRead)
+0 −1
Original line number Diff line number Diff line
@@ -266,7 +266,6 @@ class SummaryNotificationDataCreatorTest {
        return NotificationData(account, activeNotifications, inactiveNotifications = emptyList())
    }

    @OptIn(ExperimentalStdlibApi::class)
    private fun createNotificationDataWithMultipleMessages(times: Int = 2): NotificationData {
        val contentList = buildList {
            repeat(times) {
+3 −3
Original line number Diff line number Diff line
@@ -5,13 +5,13 @@ import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.lifecycleScope
import androidx.lifecycle.repeatOnLifecycle
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.FlowCollector
import kotlinx.coroutines.launch

fun <T> Flow<T>.observe(lifecycleOwner: LifecycleOwner, action: suspend (T) -> Unit) {
fun <T> Flow<T>.observe(lifecycleOwner: LifecycleOwner, collector: FlowCollector<T>) {
    lifecycleOwner.lifecycleScope.launch {
        lifecycleOwner.repeatOnLifecycle(Lifecycle.State.STARTED) {
            collect(action)
            collect(collector)
        }
    }
}
Loading