Giter Site home page Giter Site logo

Comments (4)

Giszmo avatar Giszmo commented on July 19, 2024

When a profile is selected, the following should happen:

  • update the in-group store
  • add the selected profile's follows into the first level
  • add those profiles' follows that are not the selected or first degree follows into the second level
  • ...

The store probably needs a function to return the degree of a pubkey so it can display it quickly.


This is an idea of mine and not used in any other nostr client so far. My thesis is that we can store the 10k most relevant profiles (later we might have to tweak how to find them but so far there are no 10k profiles in total in all of nostr) and show the user only what happens in his proximity. If he follows 10k accounts, the follows of his follows are irrelevant. If he follows just one user who himself follows just two, he might see 8th degree follows' as in-group, too.

So #13 is just about compiling this list and keeping it ready, probably as a store. Downloading events is not required in this scope. Just work with what's downloaded already. The code for downloading events doesn't work account by account but considers all own accounts at startup and gets updated with every startup, so just assume the follows lists in IDB are up to date.

You might want to re-use part of the code from the logic that downloads relevant events as it constructs the n-th degree follows list already.

from nostroid.

louishuddleston avatar louishuddleston commented on July 19, 2024

@Giszmo would it make sense to use the existing profile cache store?

from nostroid.

Giszmo avatar Giszmo commented on July 19, 2024

Yes, the store can be used for that. The DB should keep using the overall followership but in memory the store may update that according to who's selected.

from nostroid.

louishuddleston avatar louishuddleston commented on July 19, 2024

Cool, that's how I've done it in #55

from nostroid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.