Skip to content

Commit

Permalink
0.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
A.Badakhshan committed Apr 19, 2020
1 parent 2a2f8ce commit bbcacf5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class MessagesFragment : FragmentationFragment() {
private fun getMessagesList() {
AyanNotification.getNotificationList(10) { success, totalCount, unSeenCount, notifications, getNextPageClosure ->
if (success) {
messagesList.addAll(notifications)
notifications?.let { messagesList.addAll(it) }
if (messagesList.isEmpty()) {
noMessageTv.visibility = View.VISIBLE
} else {
Expand Down
2 changes: 1 addition & 1 deletion pushsdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {
minSdkVersion 16
targetSdkVersion 29
versionCode 1
versionName "0.1.3"
versionName "0.1.4"
consumerProguardFiles 'consumer-rules.pro'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ object AyanNotification {
success,
it.TotalCount,
it.UnSeenCount,
it.Notifications.map {
it.Notifications?.map {
NotificationObject(
it.NotificationID,
MessageDeserializer.stringToMessage(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ data class GetNotificationsListInput(
data class GetNotificationsListOutput(
val HasMore: Boolean,
val NextOffset: Long,
val Notifications: List<GetNotificationDetailOutput>,
val Notifications: List<GetNotificationDetailOutput>?,
val TotalCount: Long,
val UnSeenCount: Long
)
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ typealias NotificationObjectsCallBack = (
success: Boolean,
totalCount: Long,
unSeenCount: Long,
notifications: List<NotificationObject<*>>,
notifications: List<NotificationObject<*>>?,
getNextPageClosure: SimpleCallBack?
) -> Unit

Expand Down Expand Up @@ -76,7 +76,10 @@ object PushNotificationNetworking {
ayanApi.ayanCall<Void>(
AyanCallStatus {
success {
PreferencesManager.saveToSharedPreferences(Constants.SERVER_NOTIFIED_MOBILE, true)
PreferencesManager.saveToSharedPreferences(
Constants.SERVER_NOTIFIED_MOBILE,
true
)
Log.d(
"AyanPush",
"User mobile number successfully reported to the server."
Expand Down Expand Up @@ -118,7 +121,9 @@ object PushNotificationNetworking {
ayanApi.ayanCall<GetNotificationsListOutput>(
AyanCallStatus {
success {
it.response?.Parameters?.let { callback(true, it) }
it.response?.Parameters?.let {
callback(true, it)
}
}
failure {
callback(false, null)
Expand Down

0 comments on commit bbcacf5

Please sign in to comment.