From 51bc920adaed71150853ce4420002a6939f4ce06 Mon Sep 17 00:00:00 2001
From: Lim Chee Aun
Date: Fri, 17 Mar 2023 18:58:10 +0800
Subject: [PATCH] Show last status timestamp if not being followed
---
src/components/account-info.css | 1 +
src/components/account-info.jsx | 11 +++++++++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/components/account-info.css b/src/components/account-info.css
index 71c946ca..8184aac5 100644
--- a/src/components/account-info.css
+++ b/src/components/account-info.css
@@ -153,6 +153,7 @@
gap: 8px;
justify-content: space-between;
min-height: 2.5em;
+ align-items: center;
}
.account-container .actions button {
align-self: flex-end;
diff --git a/src/components/account-info.jsx b/src/components/account-info.jsx
index a084db00..2f020918 100644
--- a/src/components/account-info.jsx
+++ b/src/components/account-info.jsx
@@ -2,6 +2,7 @@ import './account-info.css';
import { useEffect, useRef, useState } from 'preact/hooks';
+import RelativeTime from '../components/relative-time';
import { api } from '../utils/api';
import emojifyText from '../utils/emojify-text';
import enhanceContent from '../utils/enhance-content';
@@ -359,7 +360,7 @@ function RelatedActions({ info, instance, authenticated }) {
const [relationship, setRelationship] = useState(null);
const [familiarFollowers, setFamiliarFollowers] = useState([]);
- const { id, locked } = info;
+ const { id, locked, lastStatusAt } = info;
const accountID = useRef(id);
const {
@@ -473,7 +474,13 @@ function RelatedActions({ info, instance, authenticated }) {
)}
- {followedBy ? Following you : }{' '}
+ {followedBy ? (
+ Following you
+ ) : (
+
+ Last status:
+
+ )}{' '}
{relationshipUIState !== 'loading' && relationship && (