Skip to content

Commit

Permalink
Merge pull request #1938 from pantasystem/feature/role-badge-fix
Browse files Browse the repository at this point in the history
ロールバッジの実装の調整をした
  • Loading branch information
pantasystem authored Nov 1, 2023
2 parents 1771ead + 8d70487 commit 5cf71c9
Show file tree
Hide file tree
Showing 16 changed files with 3,997 additions and 210 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class UserTest {
isSameHost = true,
instance = null,
avatarBlurhash = null,
badgeRoles = emptyList(),
)

val profileUrl = user.getProfileUrl(
Expand Down Expand Up @@ -54,6 +55,7 @@ class UserTest {
isSameHost = false,
instance = null,
avatarBlurhash = null,
badgeRoles = emptyList(),
)

val profileUrl = user.getProfileUrl(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class DeleteNicknameUseCaseTest {
isSameHost = true,
instance = null,
avatarBlurhash = null,
badgeRoles = emptyList(),
)
deleteNicknameUseCase = DeleteNicknameUseCase(
userDataSource = userDataSource,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class UpdateNicknameUseCaseTest {
isSameHost = true,
instance = null,
avatarBlurhash = null,
badgeRoles = emptyList(),
)
userDataSource.add(user)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package net.pantasystem.milktea.common_android.ui

import android.content.Context
import android.util.TypedValue
import android.widget.TextView

Expand All @@ -15,4 +16,12 @@ object FontSizeHelper {
val baseHeightPx = context.resources.displayMetrics.scaledDensity * fontSize
setMemoFontPxSize(baseHeightPx)
}

fun Context.specialPointToPixel(sp: Float): Float {
return TypedValue.applyDimension(
TypedValue.COMPLEX_UNIT_SP,
sp,
this.resources.displayMetrics
)
}
}
Loading

0 comments on commit 5cf71c9

Please sign in to comment.