Browse Source

Merge pull request #1 from QuickMythril/threads-avatar

Add avatar images to threads posts
feature/version-2
Qortal Dev 7 months ago committed by GitHub
parent
commit
604e5ee096
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 19
      src/pages/Mail/GroupMail.tsx

19
src/pages/Mail/GroupMail.tsx

@ -90,7 +90,22 @@ export const GroupMail = ({ groupInfo, setCurrentThread, currentThread, filterMo
const dispatch = useDispatch();
const navigate = useNavigate();
const getAvatar = async (user: string) => {
try {
let url = await qortalRequest({
action: 'GET_QDN_RESOURCE_URL',
name: user,
service: 'THUMBNAIL',
identifier: 'qortal_avatar'
})
dispatch(
setUserAvatarHash({
name: user,
url
})
)
} catch (error) {}
}
const getAllThreads = React.useCallback(
async (groupId: string, mode: string, isInitial?: boolean) => {
@ -271,7 +286,7 @@ export const GroupMail = ({ groupInfo, setCurrentThread, currentThread, filterMo
}
}
await getAvatar(thread?.name);
}
} catch (error) {
console.log(error)

Loading…
Cancel
Save