mirror of
https://github.com/InsanusMokrassar/PlaguPoster.git
synced 2026-03-21 00:12:42 +00:00
small optimization of panel ratings button
This commit is contained in:
@@ -347,12 +347,19 @@ object Plugin : Plugin {
|
||||
}
|
||||
}
|
||||
.let {
|
||||
val rating = rating()
|
||||
if (rating != null) {
|
||||
it.replace(
|
||||
currentRatingControlSymbol,
|
||||
rating.double.roundToInt().toString()
|
||||
)
|
||||
if (it.contains(currentRatingControlSymbol)) {
|
||||
val rating = rating()
|
||||
if (rating != null) {
|
||||
it.replace(
|
||||
currentRatingControlSymbol,
|
||||
rating.double.roundToInt().toString()
|
||||
)
|
||||
} else {
|
||||
it.replace(
|
||||
currentRatingControlSymbol,
|
||||
UnsuccessfulSymbol
|
||||
)
|
||||
}
|
||||
} else {
|
||||
it
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user