mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-26 04:58:49 +03:00
Use 'You' instead of your own user id
This commit is contained in:
parent
146aaa8746
commit
7a56f65fb3
1 changed files with 12 additions and 6 deletions
|
@ -121,7 +121,8 @@ TimelineItem::TimelineItem(ImageItem *image,
|
||||||
auto timestamp = QDateTime::fromMSecsSinceEpoch(event.timestamp());
|
auto timestamp = QDateTime::fromMSecsSinceEpoch(event.timestamp());
|
||||||
auto displayName = TimelineViewManager::displayName(event.sender());
|
auto displayName = TimelineViewManager::displayName(event.sender());
|
||||||
|
|
||||||
descriptionMsg_ = {displayName,
|
QSettings settings;
|
||||||
|
descriptionMsg_ = {event.sender() == settings.value("auth/user_id") ? "You" : displayName,
|
||||||
" sent an image",
|
" sent an image",
|
||||||
descriptiveTime(QDateTime::fromMSecsSinceEpoch(event.timestamp()))};
|
descriptiveTime(QDateTime::fromMSecsSinceEpoch(event.timestamp()))};
|
||||||
|
|
||||||
|
@ -147,7 +148,11 @@ TimelineItem::TimelineItem(ImageItem *image, const events::MessageEvent<msgs::Im
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
descriptionMsg_ = {TimelineViewManager::displayName(event.sender()),
|
|
||||||
|
auto displayName = TimelineViewManager::displayName(event.sender());
|
||||||
|
|
||||||
|
QSettings settings;
|
||||||
|
descriptionMsg_ = {event.sender() == settings.value("auth/user_id") ? "You" : displayName,
|
||||||
" sent an image",
|
" sent an image",
|
||||||
descriptiveTime(QDateTime::fromMSecsSinceEpoch(event.timestamp()))};
|
descriptiveTime(QDateTime::fromMSecsSinceEpoch(event.timestamp()))};
|
||||||
|
|
||||||
|
@ -211,11 +216,12 @@ TimelineItem::TimelineItem(const events::MessageEvent<msgs::Text> &event, bool w
|
||||||
|
|
||||||
auto body = event.content().body().trimmed().toHtmlEscaped();
|
auto body = event.content().body().trimmed().toHtmlEscaped();
|
||||||
auto timestamp = QDateTime::fromMSecsSinceEpoch(event.timestamp());
|
auto timestamp = QDateTime::fromMSecsSinceEpoch(event.timestamp());
|
||||||
|
auto displayName = TimelineViewManager::displayName(event.sender());
|
||||||
|
|
||||||
descriptionMsg_ = {
|
QSettings settings;
|
||||||
TimelineViewManager::displayName(event.sender()),
|
descriptionMsg_ = {event.sender() == settings.value("auth/user_id") ? "You" : displayName,
|
||||||
QString(": %1").arg(body),
|
QString(": %1").arg(body),
|
||||||
descriptiveTime(QDateTime::fromMSecsSinceEpoch(event.timestamp()))};
|
descriptiveTime(QDateTime::fromMSecsSinceEpoch(event.timestamp()))};
|
||||||
|
|
||||||
generateTimestamp(timestamp);
|
generateTimestamp(timestamp);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue