mirror of
https://github.com/plebbit/seedit.git
synced 2026-02-15 08:21:19 -05:00
fix(offline indicator): change last online check from 30 to 60 minutes for a better estimate
This commit is contained in:
@@ -135,7 +135,7 @@ const Sidebar = ({ comment, isSubCreatedButNotYetPublished, settings, subplebbit
|
||||
const { cid, downvoteCount, timestamp, upvoteCount } = comment || {};
|
||||
|
||||
const { allActiveUserCount, hourActiveUserCount } = useSubplebbitStats({ subplebbitAddress: address });
|
||||
const isOnline = updatedAt && updatedAt > Date.now() / 1000 - 60 * 30;
|
||||
const isOnline = updatedAt && updatedAt > Date.now() / 1000 - 60 * 60;
|
||||
const onlineNotice = t('users_online', { count: hourActiveUserCount });
|
||||
const offlineNotice = updatedAt && t('posts_last_synced', { dateAgo: getFormattedTimeAgo(updatedAt) });
|
||||
const onlineStatus = isOnline ? onlineNotice : offlineNotice;
|
||||
|
||||
@@ -42,7 +42,7 @@ const Subplebbit = () => {
|
||||
</>
|
||||
);
|
||||
|
||||
let isOnline = updatedAt && updatedAt > Date.now() / 1000 - 60 * 30;
|
||||
let isOnline = updatedAt && updatedAt > Date.now() / 1000 - 60 * 60;
|
||||
const isSubCreatedButNotYetPublished = typeof createdAt === 'number' && !updatedAt;
|
||||
|
||||
const { blocked } = useBlock({ address: subplebbitAddress });
|
||||
|
||||
@@ -130,7 +130,7 @@ const Subplebbit = ({ subplebbit }: SubplebbitProps) => {
|
||||
|
||||
const postScore = upvoteCount === 0 && downvoteCount === 0 ? '•' : upvoteCount - downvoteCount || '•';
|
||||
const { allActiveUserCount } = useSubplebbitStats({ subplebbitAddress: address });
|
||||
const isOnline = updatedAt && updatedAt > Date.now() / 1000 - 60 * 30;
|
||||
const isOnline = updatedAt && updatedAt > Date.now() / 1000 - 60 * 60;
|
||||
|
||||
return (
|
||||
<div className={styles.subplebbit}>
|
||||
|
||||
Reference in New Issue
Block a user