tgrosinger / recent-files-obsidian

Display a list of most recently opened files
GNU General Public License v3.0
319 stars 30 forks source link

Sync recent files list #46

Closed feedhopper closed 1 week ago

feedhopper commented 1 year ago

I would actually love to see an option to sync recent files between mobile and desktop. It would allow me to continue my work seamlessly when I need to switch devices...

In case of more than one profile exists( I have two: desktop for PC and Android Tablet and mobile for my smartphone), there could be tabs presenting the recent file lists for each profile. Only when I pick a note from another sync list, it would incorporate into the devices recent files overview.

This way, users who do NOT wish to be auto-synchronized, would not get in trouble.

thibaultmol commented 1 year ago

YES, I also sometimes want to continue notes on my phone. Or the other way round. and just getting back to the most recent file would be so convenient

bradsayers commented 11 months ago

I regularly move back and forth from desktop to mobile and would love to see this!

nicolnt commented 7 months ago

I am using Obsidian Sync, and it does sync daja.json on both my phone and desktop PC. However, I need to restart Obsidian to make recent-files-obsidian actually update the list in the pane on the left. The plugin doesn't listen for data.json changes coming from outside (whether it is Obsidian Sync or any cloud provider you may be using), as mentioned in this comment https://github.com/tgrosinger/recent-files-obsidian/issues/33#issuecomment-996897009

kazdonkai commented 7 months ago

The Chronology plugin shows all updated files for all synchronized platforms. Therefore, it would be a good reference for this plugin. github.com/Canna71/obsidian-chronology

nicolnt commented 7 months ago

Nice plugin! Thanks for the discovery. I was using this plugin personally obsidian-contribution-graph

kazdonkai commented 7 months ago

The problem with the Chronology plugin is that it does not allow for context menus or drag and drop. Moreover, it has not been updated recently, so I don't have much hope for it. So, I am looking forward to the Recent files plugin's expanded functionality.

iiz00 commented 6 months ago

Thanks to Obsidian's recent API addition (https://github.com/obsidianmd/obsidian-api/blob/master/CHANGELOG.md#v157), It seems that simply adding the following code to the RecentFilesPlugin class is generally sufficient to achieve synchronization of history between devices.

async onExternalSettingsChange() {
    await this.loadData();
    this.view.redraw();
}
bradsayers commented 5 months ago

I tried iiz00's option but it only seems to work when I restart the apps on both devices. It would be nice to have real time syncing...

iiz00 commented 5 months ago

Hmm, that's unfortunate. While it seems to be synchronizing in real-time fairly well in my environment, it's still just an overwrite of the history, not an integration. And I'm not sure if it's working properly in other people's environments...

seren commented 3 months ago

FWIW, I just tried iiz00's suggestion, and it's working between Mac and iOS (using Obsidian Sync).

notDavid commented 2 months ago

FWIW, I just tried iiz00's suggestion, and it's working between Mac and iOS (using Obsidian Sync).

Can also confirm it works between Mac and iOS, without restarting the app.

@tgrosinger will you merge https://github.com/tgrosinger/recent-files-obsidian/pull/70 ?

tgrosinger commented 1 week ago

Merged!