mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-26 19:36:21 +02:00
resolve conflicts but new issue found when changing the language
This commit is contained in:
@@ -16,9 +16,9 @@ import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.vitorpamplona.amethyst.R
|
||||
import com.vitorpamplona.amethyst.model.Account
|
||||
import com.vitorpamplona.amethyst.ui.actions.NewChannelView
|
||||
|
||||
|
@@ -24,7 +24,7 @@ fun timeAgo(mills: Long?, context : Context): String {
|
||||
.replace(" days ago", context.getString(R.string.d))
|
||||
}
|
||||
|
||||
fun timeAgoShort(mills: Long?): String {
|
||||
fun timeAgoShort(mills: Long?, context: Context): String {
|
||||
if (mills == null) return " "
|
||||
|
||||
var humanReadable = DateUtils.getRelativeTimeSpanString(
|
||||
@@ -34,7 +34,7 @@ fun timeAgoShort(mills: Long?): String {
|
||||
DateUtils.FORMAT_ABBREV_ALL
|
||||
).toString()
|
||||
if (humanReadable.startsWith("In") || humanReadable.startsWith("0")) {
|
||||
humanReadable = "now";
|
||||
humanReadable = context.getString(R.string.now);
|
||||
}
|
||||
|
||||
return humanReadable
|
||||
|
@@ -289,4 +289,4 @@ fun NoteMaster(baseNote: Note,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user