Rotonde / rotonde-client

Rotonde Base Client
https://client-neauoire.hashbase.io/
MIT License
227 stars 49 forks source link

Feed fails to load if not subscribed to any portals #57

Closed ljcooke closed 6 years ago

ljcooke commented 6 years ago

Seeing a bug on @poem_exe (linked below) which seems to be caused by it not being subscribed to any portals. After upgrading to v0.1.42, the feed fails to load and just says "Fetching 0 feeds.."

dat://3cc6b590df09ba8d87fef7cb235f0e3d3a6b6f256c7f0b0dc63059a22f638a48/

Most likely because of the return at this point in scripts/feed.js, though I'm not sure what the most appropriate fix is:

    if(entries.length === 0){
      this.el.innerHTML = "Fetching "+this.feed_urls.length+" feeds..";
      return;
    }
frozenpandaman commented 6 years ago

@poem_exe's feed loads for me (image)

edit: see reply below

frozenpandaman commented 6 years ago

Also – slightly off-topic, but – that feeds.. should probably be changed to feeds... if we want it to be a "proper" ellipsis. :P

ljcooke commented 6 years ago

Huh! Maybe it's something to do with having write access. Also agreed about the ellipsis – even better, it could use .

I just noticed now that this bug also happens in another case, if you try filtering the timeline and don't get any results, like filter asfdafsdfasd.

frozenpandaman commented 6 years ago

Nevermind – update (was about to edit my comment but just saw that you responded!): It loaded once, and now it won't – stuck on "fetching." I think it it loaded an old version of the client since I hadn't navigated to that specific user/portal in a while. Now after refreshing I see the "v0.1.42" in the sidebar and you're right, it won't load.

Nice observation re: filtering! Can confirm it's like that for me too.

always looks weird to me in monospaced fonts, but either way. :D

neauoire commented 6 years ago

It throws a whole bunch of errors, a lot of things are looking for entries, like the first entry to know the portal's last update, and so on.

ianh commented 6 years ago

Thanks ljcooke, that was the problem. That early return is supposed to stop your own entries from flashing on screen for a split second while the rest load in, but it didn't work if there weren't any other entries to load. Should be fixed now!

ianh commented 6 years ago

(or at least, it should be fixed whenever the client dat syncs from the git repository)

frozenpandaman commented 6 years ago

@ianh could we mirror the master client to hashbase and just link that in index.html? that way it'll always be synced even if @neauoire (or whoever manages it) is offline. or would that be relying on non-dat services and therefore less than ideal?

ianh commented 6 years ago

I don't know how the syncing works, you'd have to ask @neauoire about that! It might be better to run your own client if you always want the most up-to-date code.

frozenpandaman commented 6 years ago

yup, that's what i'm doing for now (and i put it on hashbase as well just so it'd always be seeded for any potential profile visitors). :)