mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-30 00:41:12 +00:00
Attempt to avoid stomping follows by refreshing before updating
This commit is contained in:
parent
72a511c846
commit
28ecf8f485
@ -28,8 +28,6 @@ If you like Coracle and want to support its development, you can donate sats via
|
||||
|
||||
# Bugs
|
||||
|
||||
- [ ] Reload user details when loading on visiting a user's page for the first time
|
||||
- [ ] Fix nuking follow list on multiple devices. Aggressive refresh? Dufflepud caching?
|
||||
- [ ] Follow fiatjaf's vision of clients being smart and connecting to recommended relays to fetch content
|
||||
- [ ] Add alerts for replies to posts the user liked
|
||||
- [ ] Stack views so scroll position isn't lost on navigation
|
||||
|
@ -186,12 +186,12 @@ const listenForEvents = async (key, filter, onEvent, {shouldProcess = true} = {}
|
||||
|
||||
listenForEvents.subs = {}
|
||||
|
||||
const loadPeople = (pubkeys, opts = {}) => {
|
||||
const loadPeople = (pubkeys, {kinds = [0, 3, 12165], ...opts} = {}) => {
|
||||
if (pubkeys.length === 0) {
|
||||
return []
|
||||
}
|
||||
|
||||
return loadEvents({kinds: [0, 3, 12165], authors: pubkeys}, opts)
|
||||
return loadEvents({kinds, authors: pubkeys}, opts)
|
||||
}
|
||||
|
||||
const syncNetwork = async () => {
|
||||
|
@ -54,16 +54,22 @@
|
||||
|
||||
const setActiveTab = tab => navigate(`/people/${pubkey}/${tab}`)
|
||||
|
||||
const follow = () => {
|
||||
relay.cmd.addPetname($user, pubkey, person.name)
|
||||
|
||||
const follow = async () => {
|
||||
following = true
|
||||
|
||||
// Make sure our follow list is up to date
|
||||
await relay.pool.loadPeople([$user.pubkey], {kinds: [3]})
|
||||
|
||||
relay.cmd.addPetname($user, pubkey, person.name)
|
||||
}
|
||||
|
||||
const unfollow = () => {
|
||||
relay.cmd.removePetname($user, pubkey)
|
||||
|
||||
const unfollow = async () => {
|
||||
following = false
|
||||
|
||||
// Make sure our follow list is up to date
|
||||
await relay.pool.loadPeople([$user.pubkey], {kinds: [3]})
|
||||
|
||||
relay.cmd.removePetname($user, pubkey)
|
||||
}
|
||||
|
||||
const openAdvanced = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user