added newline at EOF for any file not having one at its end
This commit is contained in:
parent
00e6d6c8a1
commit
4c94686172
2
pom.xml
2
pom.xml
@ -28,7 +28,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.informatik-ag-ngl</groupId>
|
<groupId>com.github.informatik-ag-ngl</groupId>
|
||||||
<artifactId>envoy-common</artifactId>
|
<artifactId>envoy-common</artifactId>
|
||||||
<version>develop-SNAPSHOT</version>
|
<version>f~forwarding_messages-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
@ -61,15 +61,13 @@ public class Chat implements Serializable {
|
|||||||
public void read(WriteProxy writeProxy) throws IOException {
|
public void read(WriteProxy writeProxy) throws IOException {
|
||||||
for (int i = model.size() - 1; i >= 0; --i) {
|
for (int i = model.size() - 1; i >= 0; --i) {
|
||||||
final Message m = model.get(i);
|
final Message m = model.get(i);
|
||||||
if (m.getSenderId() == recipient.getId()) {
|
if (m.getSenderId() == recipient.getId()) if (m.getStatus() == MessageStatus.READ) break;
|
||||||
if (m.getStatus() == MessageStatus.READ) break;
|
|
||||||
else {
|
else {
|
||||||
m.setStatus(MessageStatus.READ);
|
m.setStatus(MessageStatus.READ);
|
||||||
writeProxy.writeMessageStatusChangeEvent(new MessageStatusChangeEvent(m));
|
writeProxy.writeMessageStatusChangeEvent(new MessageStatusChangeEvent(m));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {@code true} if the newest message received in the chat doesn't have
|
* @return {@code true} if the newest message received in the chat doesn't have
|
||||||
|
@ -127,11 +127,9 @@ public class Startup {
|
|||||||
// Save all users to the local database and flush cache
|
// Save all users to the local database and flush cache
|
||||||
localDb.setUsers(client.getUsers());
|
localDb.setUsers(client.getUsers());
|
||||||
writeProxy.flushCache();
|
writeProxy.flushCache();
|
||||||
} else {
|
} else
|
||||||
|
|
||||||
// Set all contacts to offline mode
|
// Set all contacts to offline mode
|
||||||
localDb.getUsers().values().stream().filter(u -> u != localDb.getUser()).forEach(u -> u.setStatus(UserStatus.OFFLINE));
|
localDb.getUsers().values().stream().filter(u -> u != localDb.getUser()).forEach(u -> u.setStatus(UserStatus.OFFLINE));
|
||||||
}
|
|
||||||
|
|
||||||
// Display ChatWindow and StatusTrayIcon
|
// Display ChatWindow and StatusTrayIcon
|
||||||
EventQueue.invokeLater(() -> {
|
EventQueue.invokeLater(() -> {
|
||||||
|
@ -43,9 +43,11 @@ public class NewThemeScreen extends JDialog {
|
|||||||
* There are two versions of this Window. The first one is responsible for
|
* There are two versions of this Window. The first one is responsible for
|
||||||
* choosing the name, the second one appears, if the name already exists.
|
* choosing the name, the second one appears, if the name already exists.
|
||||||
*
|
*
|
||||||
* @param parent the dialog is launched with its location relative to this {@link SettingsScreen}
|
* @param parent the dialog is launched with its location relative to
|
||||||
|
* this {@link SettingsScreen}
|
||||||
* @param newThemeAction is executed when a new theme name is entered
|
* @param newThemeAction is executed when a new theme name is entered
|
||||||
* @param modifyThemeAction is executed when an existing theme name is entered and confirmed
|
* @param modifyThemeAction is executed when an existing theme name is entered
|
||||||
|
* and confirmed
|
||||||
* @since Envoy v0.3-alpha
|
* @since Envoy v0.3-alpha
|
||||||
*/
|
*/
|
||||||
public NewThemeScreen(SettingsScreen parent, Consumer<String> newThemeAction, Consumer<String> modifyThemeAction) {
|
public NewThemeScreen(SettingsScreen parent, Consumer<String> newThemeAction, Consumer<String> modifyThemeAction) {
|
||||||
|
@ -2,8 +2,6 @@ package envoy.client.ui.settings;
|
|||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.awt.event.ItemEvent;
|
|
||||||
import java.awt.event.ItemListener;
|
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@ -100,17 +98,13 @@ public class ThemeCustomizationPanel extends SettingsPanel {
|
|||||||
colorsPanel.setBackground(theme.getCellColor());
|
colorsPanel.setBackground(theme.getCellColor());
|
||||||
|
|
||||||
// Apply theme upon selection
|
// Apply theme upon selection
|
||||||
themes.addItemListener(new ItemListener() {
|
themes.addItemListener(e -> {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void itemStateChanged(ItemEvent e) {
|
|
||||||
String selectedValue = (String) themes.getSelectedItem();
|
String selectedValue = (String) themes.getSelectedItem();
|
||||||
logger.log(Level.FINEST, "Selected theme: " + selectedValue);
|
logger.log(Level.FINEST, "Selected theme: " + selectedValue);
|
||||||
|
|
||||||
final Theme currentTheme = Settings.getInstance().getTheme(selectedValue);
|
final Theme currentTheme = Settings.getInstance().getTheme(selectedValue);
|
||||||
Settings.getInstance().setCurrentTheme(selectedValue);
|
Settings.getInstance().setCurrentTheme(selectedValue);
|
||||||
EventBus.getInstance().dispatch(new ThemeChangeEvent(currentTheme));
|
EventBus.getInstance().dispatch(new ThemeChangeEvent(currentTheme));
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Apply current theme
|
// Apply current theme
|
||||||
@ -143,11 +137,9 @@ public class ThemeCustomizationPanel extends SettingsPanel {
|
|||||||
}, name -> {
|
}, name -> {
|
||||||
// Modify theme
|
// Modify theme
|
||||||
Settings.getInstance().getThemes().replace(name, new Theme(name, temporaryTheme));
|
Settings.getInstance().getThemes().replace(name, new Theme(name, temporaryTheme));
|
||||||
if (themes.getSelectedItem().equals(name)) {
|
if (themes.getSelectedItem().equals(name))
|
||||||
EventBus.getInstance().dispatch(new ThemeChangeEvent(Settings.getInstance().getTheme(name)));
|
EventBus.getInstance().dispatch(new ThemeChangeEvent(Settings.getInstance().getTheme(name)));
|
||||||
} else {
|
else themes.setSelectedItem(name);
|
||||||
themes.setSelectedItem(name);
|
|
||||||
}
|
|
||||||
}).setVisible(true);
|
}).setVisible(true);
|
||||||
themeChanged = false;
|
themeChanged = false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user