this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #310 from cheeaun/main

Update from main

authored by

Chee Aun and committed by
GitHub
84b63682 a75b2149

+15 -12
+5 -2
src/components/timeline.jsx
··· 265 265 (visible) => { 266 266 if (visible) { 267 267 const timeDiff = Date.now() - lastHiddenTime.current; 268 - if (!lastHiddenTime.current || timeDiff > 1000 * 60) { 268 + if (!lastHiddenTime.current || timeDiff > 1000 * 3) { 269 + // 3 seconds 269 270 loadOrCheckUpdates({ 270 271 disableIdleCheck: true, 271 272 }); ··· 461 462 view, 462 463 }) { 463 464 const { id: statusID, reblog, items, type, _pinned } = status; 465 + if (_pinned) useItemID = false; 464 466 const actualStatusID = reblog?.id || statusID; 465 467 const url = instance 466 468 ? `/${instance}/s/${actualStatusID}` ··· 496 498 <li key={`timeline-${statusID}`} class="timeline-item-carousel"> 497 499 <StatusCarousel title={title} class={`${type}-carousel`}> 498 500 {items.map((item) => { 499 - const { id: statusID, reblog } = item; 501 + const { id: statusID, reblog, _pinned } = item; 500 502 const actualStatusID = reblog?.id || statusID; 501 503 const url = instance 502 504 ? `/${instance}/s/${actualStatusID}` 503 505 : `/s/${actualStatusID}`; 506 + if (_pinned) useItemID = false; 504 507 return ( 505 508 <li key={statusID}> 506 509 <Link class="status-carousel-link timeline-item-alt" to={url}>
+7 -4
src/pages/account-statuses.jsx
··· 152 152 153 153 const results = []; 154 154 if (firstLoad) { 155 - const { value: pinnedStatuses } = await masto.v1.accounts 155 + const { value } = await masto.v1.accounts 156 156 .$select(id) 157 157 .statuses.list({ 158 158 pinned: true, 159 159 }) 160 160 .next(); 161 - if (pinnedStatuses?.length && !tagged && !media) { 162 - pinnedStatuses.forEach((status) => { 161 + if (value?.length && !tagged && !media) { 162 + const pinnedStatuses = value.map((status) => { 163 163 saveStatus(status, instance); 164 - status._pinned = true; 164 + return { 165 + ...status, 166 + _pinned: true, 167 + }; 165 168 }); 166 169 if (pinnedStatuses.length >= 3) { 167 170 const pinnedStatusesIds = pinnedStatuses.map((status) => status.id);
+3 -6
src/pages/notifications.jsx
··· 130 130 } 131 131 132 132 const loadNotifications = (firstLoad) => { 133 + setShowNew(false); 133 134 setUIState('loading'); 134 135 (async () => { 135 136 try { ··· 192 193 scrollTop: scrollableRef.current?.scrollTop, 193 194 inBackground: inBackground(), 194 195 disableIdleCheck, 195 - notificationsShowNew: snapStates.notificationsShowNew, 196 196 }); 197 197 if ( 198 198 snapStates.settings.autoRefresh && 199 199 scrollableRef.current?.scrollTop < 16 && 200 200 (disableIdleCheck || window.__IDLE__) && 201 - !inBackground() && 202 - snapStates.notificationsShowNew 201 + !inBackground() 203 202 ) { 204 - setShowNew(false); 205 203 loadNotifications(true); 206 - } else { 207 - setShowNew(snapStates.notificationsShowNew); 208 204 } 209 205 }, 210 206 [snapStates.notificationsShowNew, snapStates.settings.autoRefresh, uiState], ··· 228 224 if (v) { 229 225 loadUpdates(); 230 226 } 227 + setShowNew(v); 231 228 }); 232 229 } 233 230 return () => {