mirror of
https://github.com/nextcloud/talk-android
synced 2025-02-02 20:53:09 +00:00
ktlint
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
This commit is contained in:
parent
8b07a2aa72
commit
a234c178a8
@ -128,18 +128,21 @@ class DirectReplyReceiver : BroadcastReceiver() {
|
||||
val avatarUrl = ApiUtils.getUrlForAvatar(currentUser.baseUrl, currentUser.userId, false)
|
||||
val imageRequest = DisplayUtils.getImageRequestForUrl(avatarUrl, currentUser)
|
||||
val dataSource = Fresco.getImagePipeline().fetchDecodedImage(imageRequest, null)
|
||||
dataSource.subscribe(object : BaseBitmapDataSubscriber() {
|
||||
override fun onNewResultImpl(bitmap: Bitmap?) {
|
||||
if (bitmap != null) {
|
||||
RoundAsCirclePostprocessor(true).process(bitmap)
|
||||
callback(IconCompat.createWithBitmap(bitmap))
|
||||
dataSource.subscribe(
|
||||
object : BaseBitmapDataSubscriber() {
|
||||
override fun onNewResultImpl(bitmap: Bitmap?) {
|
||||
if (bitmap != null) {
|
||||
RoundAsCirclePostprocessor(true).process(bitmap)
|
||||
callback(IconCompat.createWithBitmap(bitmap))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFailureImpl(dataSource: DataSource<CloseableReference<CloseableImage?>>) {
|
||||
// unused atm
|
||||
}
|
||||
}, UiThreadImmediateExecutorService.getInstance())
|
||||
override fun onFailureImpl(dataSource: DataSource<CloseableReference<CloseableImage?>>) {
|
||||
// unused atm
|
||||
}
|
||||
},
|
||||
UiThreadImmediateExecutorService.getInstance()
|
||||
)
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
@ -182,5 +185,4 @@ class DirectReplyReceiver : BroadcastReceiver() {
|
||||
// Update the active notification.
|
||||
NotificationManagerCompat.from(context).notify(notificationId!!, previousBuilder.build())
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user