this repo has no description
0
fork

Configure Feed

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

Merge pull request #308 from cheeaun/main

Update from main

authored by

Chee Aun and committed by
GitHub
a75b2149 33c3b63b

+11 -14
+2 -10
src/components/shortcuts-settings.jsx
··· 466 466 maxAge: FETCH_MAX_AGE, 467 467 }, 468 468 ); 469 - const fetchFollowedHashtags = pmem( 470 - () => { 471 - const { masto } = api(); 472 - return masto.v1.followedTags.list(); 473 - }, 474 - { 475 - maxAge: FETCH_MAX_AGE, 476 - }, 477 - ); 478 469 479 470 function ShortcutForm({ 480 471 onSubmit, ··· 486 477 console.log('shortcut', shortcut); 487 478 const editMode = !!shortcut; 488 479 const [currentType, setCurrentType] = useState(shortcut?.type || null); 480 + const { masto } = api(); 489 481 490 482 const [uiState, setUIState] = useState('default'); 491 483 const [lists, setLists] = useState([]); ··· 508 500 (async () => { 509 501 if (currentType !== 'hashtag') return; 510 502 try { 511 - const iterator = fetchFollowedHashtags(); 503 + const iterator = masto.v1.followedTags.list(); 512 504 const tags = []; 513 505 do { 514 506 const { value, done } = await iterator.next();
+7 -3
src/components/shortcuts.jsx
··· 101 101 {formattedShortcuts.map( 102 102 ({ id, path, title, subtitle, icon }, i) => { 103 103 return ( 104 - <li key={i + title}> 104 + <li key={`${i}-${id}-${title}-${subtitle}-${path}`}> 105 105 <Link 106 106 class={subtitle ? 'has-subtitle' : ''} 107 107 to={path} ··· 170 170 </button> 171 171 } 172 172 > 173 - {formattedShortcuts.map(({ path, title, subtitle, icon }, i) => { 173 + {formattedShortcuts.map(({ id, path, title, subtitle, icon }, i) => { 174 174 return ( 175 - <MenuLink to={path} key={i + title} class="glass-menu-item"> 175 + <MenuLink 176 + to={path} 177 + key={`${i}-${id}-${title}-${subtitle}-${path}`} 178 + class="glass-menu-item" 179 + > 176 180 <Icon icon={icon} size="l" />{' '} 177 181 <span class="menu-grow"> 178 182 <span>
+2 -1
src/pages/notifications.jsx
··· 216 216 let unsub; 217 217 if (visible) { 218 218 const timeDiff = Date.now() - lastHiddenTime.current; 219 - if (!lastHiddenTime.current || timeDiff > 1000 * 60) { 219 + if (!lastHiddenTime.current || timeDiff > 1000 * 3) { 220 + // 3 seconds 220 221 loadUpdates({ 221 222 disableIdleCheck: true, 222 223 });