mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
[gitlab] show default avatar image when user avatar is missing or we cant load it
IDEA-312969 Fixed GitOrigin-RevId: 3171d62f42f982e1fe6e1958229a7f4d14d1590a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a14a9a77ed
commit
4088653b40
@@ -2,7 +2,7 @@
|
||||
package org.jetbrains.plugins.gitlab.authentication.ui
|
||||
|
||||
import com.intellij.collaboration.auth.ui.LazyLoadingAccountsDetailsProvider
|
||||
import com.intellij.util.ui.EmptyIcon
|
||||
import icons.CollaborationToolsIcons
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import org.jetbrains.plugins.gitlab.api.GitLabApi
|
||||
import org.jetbrains.plugins.gitlab.api.dto.GitLabUserDTO
|
||||
@@ -14,7 +14,7 @@ import java.awt.Image
|
||||
|
||||
internal class GitLabAccountsDetailsProvider(scope: CoroutineScope,
|
||||
private val apiClientSupplier: suspend (GitLabAccount) -> GitLabApi?)
|
||||
: LazyLoadingAccountsDetailsProvider<GitLabAccount, GitLabUserDTO>(scope, EmptyIcon.ICON_16) {
|
||||
: LazyLoadingAccountsDetailsProvider<GitLabAccount, GitLabUserDTO>(scope, CollaborationToolsIcons.Review.DefaultAvatar) {
|
||||
|
||||
override suspend fun loadDetails(account: GitLabAccount): Result<GitLabUserDTO> {
|
||||
val api = apiClientSupplier(account) ?: return Result.Error(GitLabBundle.message("account.token.missing"), true)
|
||||
|
||||
Reference in New Issue
Block a user