mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-08-31 04:58:09 +00:00
UI: Exclude local peer from activity acknowledgment list for better UX.
This commit is contained in:
@@ -159,6 +159,7 @@ function updateLastActionUI(state, peers) {
|
|||||||
|
|
||||||
peers.forEach(peer => {
|
peers.forEach(peer => {
|
||||||
const pId = typeof peer === 'object' ? peer.peerId : peer;
|
const pId = typeof peer === 'object' ? peer.peerId : peer;
|
||||||
|
if (pId === localPeerId) return; // Exclude local user from acknowledgment list
|
||||||
const pName = (typeof peer === 'object' && peer.username) ? peer.username : pId.substring(0, 4);
|
const pName = (typeof peer === 'object' && peer.username) ? peer.username : pId.substring(0, 4);
|
||||||
const isAcked = state.acks.includes(pId) || pId === state.senderId;
|
const isAcked = state.acks.includes(pId) || pId === state.senderId;
|
||||||
const color = isAcked ? 'var(--success)' : '#475569';
|
const color = isAcked ? 'var(--success)' : '#475569';
|
||||||
|
|||||||
Reference in New Issue
Block a user