Fix default type for new sites & site UI updating.
This commit is contained in:
@@ -10,6 +10,6 @@ import com.lyndir.masterpassword.model.impl.*;
|
||||
public class MPNewSite extends MPBasicSite<MPUser<?>, MPQuestion> {
|
||||
|
||||
public MPNewSite(final MPUser<?> user, final String siteName) {
|
||||
super( user, siteName, user.getAlgorithm() );
|
||||
super( user, siteName );
|
||||
}
|
||||
}
|
||||
|
@@ -472,16 +472,11 @@ public class UserContentPanel extends JPanel implements MasterPassword.Listener,
|
||||
sitesModel.registerList( sitesList );
|
||||
add( Box.createGlue() );
|
||||
|
||||
addComponentListener( new ComponentAdapter() {
|
||||
@Override
|
||||
public void componentShown(final ComponentEvent e) {
|
||||
user.addListener( AuthenticatedUserPanel.this );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void componentHidden(final ComponentEvent e) {
|
||||
user.removeListener( AuthenticatedUserPanel.this );
|
||||
}
|
||||
addHierarchyListener( e -> {
|
||||
if (null != SwingUtilities.windowForComponent( this ))
|
||||
user.addListener( this );
|
||||
else
|
||||
user.removeListener( this );
|
||||
} );
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user