diff --git a/messaginginapp/api/messaginginapp.api b/messaginginapp/api/messaginginapp.api index 5f408c80c..0e5abe076 100644 --- a/messaginginapp/api/messaginginapp.api +++ b/messaginginapp/api/messaginginapp.api @@ -131,17 +131,19 @@ public final class io/customer/messaginginapp/gist/data/model/LogEvent { public final class io/customer/messaginginapp/gist/data/model/Message { public fun ()V - public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/util/Map;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/lang/String; - public final fun component3 ()Ljava/lang/String; - public final fun component4 ()Ljava/util/Map; - public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;)Lio/customer/messaginginapp/gist/data/model/Message; - public static synthetic fun copy$default (Lio/customer/messaginginapp/gist/data/model/Message;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;ILjava/lang/Object;)Lio/customer/messaginginapp/gist/data/model/Message; + public final fun component3 ()Ljava/lang/Integer; + public final fun component4 ()Ljava/lang/String; + public final fun component5 ()Ljava/util/Map; + public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/util/Map;)Lio/customer/messaginginapp/gist/data/model/Message; + public static synthetic fun copy$default (Lio/customer/messaginginapp/gist/data/model/Message;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/util/Map;ILjava/lang/Object;)Lio/customer/messaginginapp/gist/data/model/Message; public fun equals (Ljava/lang/Object;)Z public final fun getInstanceId ()Ljava/lang/String; public final fun getMessageId ()Ljava/lang/String; + public final fun getPriority ()Ljava/lang/Integer; public final fun getProperties ()Ljava/util/Map; public final fun getQueueId ()Ljava/lang/String; public fun hashCode ()I diff --git a/messaginginapp/src/main/java/io/customer/messaginginapp/gist/data/listeners/Queue.kt b/messaginginapp/src/main/java/io/customer/messaginginapp/gist/data/listeners/Queue.kt index 3a76fb714..b52ccc7b1 100644 --- a/messaginginapp/src/main/java/io/customer/messaginginapp/gist/data/listeners/Queue.kt +++ b/messaginginapp/src/main/java/io/customer/messaginginapp/gist/data/listeners/Queue.kt @@ -16,7 +16,6 @@ import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.launch import okhttp3.Cache import okhttp3.OkHttpClient -import okhttp3.Response import okhttp3.ResponseBody.Companion.toResponseBody import retrofit2.Retrofit import retrofit2.converter.gson.GsonConverterFactory @@ -142,7 +141,7 @@ class Queue : GistListener { } private fun handleMessages(messages: List) { - // Sorting messages by priority and placing nulls last. + // Sorting messages by priority and placing nulls last val sortedMessages = messages.sortedWith(compareBy(nullsLast()) { it.priority }) for (message in sortedMessages) { processMessage(message)