commit
a75b214999
|
@ -466,15 +466,6 @@ const fetchLists = pmem(
|
|||
maxAge: FETCH_MAX_AGE,
|
||||
},
|
||||
);
|
||||
const fetchFollowedHashtags = pmem(
|
||||
() => {
|
||||
const { masto } = api();
|
||||
return masto.v1.followedTags.list();
|
||||
},
|
||||
{
|
||||
maxAge: FETCH_MAX_AGE,
|
||||
},
|
||||
);
|
||||
|
||||
function ShortcutForm({
|
||||
onSubmit,
|
||||
|
@ -486,6 +477,7 @@ function ShortcutForm({
|
|||
console.log('shortcut', shortcut);
|
||||
const editMode = !!shortcut;
|
||||
const [currentType, setCurrentType] = useState(shortcut?.type || null);
|
||||
const { masto } = api();
|
||||
|
||||
const [uiState, setUIState] = useState('default');
|
||||
const [lists, setLists] = useState([]);
|
||||
|
@ -508,7 +500,7 @@ function ShortcutForm({
|
|||
(async () => {
|
||||
if (currentType !== 'hashtag') return;
|
||||
try {
|
||||
const iterator = fetchFollowedHashtags();
|
||||
const iterator = masto.v1.followedTags.list();
|
||||
const tags = [];
|
||||
do {
|
||||
const { value, done } = await iterator.next();
|
||||
|
|
|
@ -101,7 +101,7 @@ function Shortcuts() {
|
|||
{formattedShortcuts.map(
|
||||
({ id, path, title, subtitle, icon }, i) => {
|
||||
return (
|
||||
<li key={i + title}>
|
||||
<li key={`${i}-${id}-${title}-${subtitle}-${path}`}>
|
||||
<Link
|
||||
class={subtitle ? 'has-subtitle' : ''}
|
||||
to={path}
|
||||
|
@ -170,9 +170,13 @@ function Shortcuts() {
|
|||
</button>
|
||||
}
|
||||
>
|
||||
{formattedShortcuts.map(({ path, title, subtitle, icon }, i) => {
|
||||
{formattedShortcuts.map(({ id, path, title, subtitle, icon }, i) => {
|
||||
return (
|
||||
<MenuLink to={path} key={i + title} class="glass-menu-item">
|
||||
<MenuLink
|
||||
to={path}
|
||||
key={`${i}-${id}-${title}-${subtitle}-${path}`}
|
||||
class="glass-menu-item"
|
||||
>
|
||||
<Icon icon={icon} size="l" />{' '}
|
||||
<span class="menu-grow">
|
||||
<span>
|
||||
|
|
|
@ -216,7 +216,8 @@ function Notifications({ columnMode }) {
|
|||
let unsub;
|
||||
if (visible) {
|
||||
const timeDiff = Date.now() - lastHiddenTime.current;
|
||||
if (!lastHiddenTime.current || timeDiff > 1000 * 60) {
|
||||
if (!lastHiddenTime.current || timeDiff > 1000 * 3) {
|
||||
// 3 seconds
|
||||
loadUpdates({
|
||||
disableIdleCheck: true,
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue