Coder Social home page Coder Social logo

Comments (2)

Siedlerchr avatar Siedlerchr commented on June 12, 2024 1

Groups are part of the metadata and are synced as well when a new group is added, at least what I observed. I need to do some more testing to find out where exactly on the receiver side the sync does trigger a change/does not

from jabref.

Siedlerchr avatar Siedlerchr commented on June 12, 2024

I debugged and analyzed a bit further, and I think I narrowed down the problem. It's mainly a UI issue.

As a workaround you can create a new empty library and just switch back and forth

  1. User A adds a new group to the shared database
  2. User B does not see the changes -> Switches to a new empty library and back
  3. Group is there

This works for adding or changing existing groups.

Code related:

/**
* Gets invoked if the user changes the active database.
* We need to get the new group tree and update the view
*/
private void onActiveDatabaseChanged(Optional<BibDatabaseContext> newDatabase) {
if (newDatabase.isPresent()) {
GroupNodeViewModel newRoot = newDatabase
.map(BibDatabaseContext::getMetaData)
.flatMap(MetaData::getGroups)
.map(root -> new GroupNodeViewModel(newDatabase.get(), stateManager, taskExecutor, root, localDragboard, preferences))
.orElse(GroupNodeViewModel.getAllEntriesGroup(newDatabase.get(), stateManager, taskExecutor, localDragboard, preferences));
rootGroup.setValue(newRoot);
if (stateManager.getSelectedGroups(newDatabase.get()).isEmpty()) {
stateManager.setSelectedGroups(newDatabase.get(), Collections.singletonList(newRoot.getGroupNode()));
}

Groups deletion seems to be a separate issue. That does not get synced correctly in the metadata. At least from my debugging observation

from jabref.

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.