Skip to content

Commit

Permalink
1.0.1.8 hotfix release commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Exslims committed Aug 20, 2017
1 parent f307889 commit 5f38c4c
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 37 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.mercury.platform.core;

public class MercuryConstants {
public static final String APP_VERSION = "1.0.1.8.0";
public static final String APP_VERSION = "1.0.1.8.1";
public static final String SERVER_HOST = "exslims.ddns.net";
public static final int PORT = 5555;
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public HotKeysSettingsDescriptor getDefault() {
scannerNDataList.add(new HotKeyPair(HotKeyType.N_CLOSE_NOTIFICATION,new HotKeyDescriptor("F6",NativeKeyEvent.VC_F6,false,false,false)));

List<HotKeyPair> taskBarNDataList = new ArrayList<>();
taskBarNDataList.add(new HotKeyPair(HotKeyType.T_TO_HIDEOUT,new HotKeyDescriptor("F1",NativeKeyEvent.VC_F1,false,false,false)));
taskBarNDataList.add(new HotKeyPair(HotKeyType.T_TO_HIDEOUT,new HotKeyDescriptor("F10",NativeKeyEvent.VC_F10,false,false,false)));
// taskBarNDataList.add(new HotKeyPair(HotKeyType.T_DND,new HotKeyDescriptor("F2",NativeKeyEvent.VC_F2,false,false,false)));

hotKeysSettingsDescriptor.setIncNHotKeysList(incNDataList);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,12 @@ public void mousePressed(MouseEvent e) {
MercuryStoreCore.hotKeySubject.subscribe(hotKey -> {
if (allowed) {
button.setBackground(AppThemeColor.BUTTON);
if (hotKey.getVirtualKeyCode() == 27) {
if (hotKey.getVirtualKeyCode() == 1) {
descriptor.setHotKeyDescriptor(new HotKeyDescriptor());
} else {
descriptor.setHotKeyDescriptor(hotKey);
}
button.setText(hotKey.getTitle());
button.setText(descriptor.getTitle());
allowed = false;
MercuryStoreUI.adrReloadSubject.onNext(descriptor);
button.addMouseListener(mouseAdapter);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ private JPanel getHeader(){
interactionPanel.add(openChatButton);
interactionPanel.add(hideButton);

this.interactButtonMap.clear();
this.interactButtonMap.put(HotKeyType.N_INVITE_PLAYER,inviteButton);
this.interactButtonMap.put(HotKeyType.N_TRADE_PLAYER,tradeButton);
this.interactButtonMap.put(HotKeyType.N_KICK_PLAYER,kickButton);
Expand All @@ -134,7 +135,9 @@ protected void updateHotKeyPool() {
.stream()
.filter(it -> it.getType().equals(type))
.findAny().orElse(null);
this.hotKeysPool.put(hotKeyPair.getDescriptor(),button);
if(!hotKeyPair.getDescriptor().getTitle().equals("...")) {
this.hotKeysPool.put(hotKeyPair.getDescriptor(), button);
}
});
this.initResponseButtonsPanel();
Window windowAncestor = SwingUtilities.getWindowAncestor(IncomingNotificationPanel.this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ private JPanel getHeader(){
// interactionPanel.add(backToHo);
interactionPanel.add(openChatButton);
interactionPanel.add(hideButton);
this.interactButtonMap.clear();
this.interactButtonMap.put(HotKeyType.N_VISITE_HIDEOUT,visiteHideout);
this.interactButtonMap.put(HotKeyType.N_TRADE_PLAYER,tradeButton);
this.interactButtonMap.put(HotKeyType.N_LEAVE,leaveButton);
Expand All @@ -97,7 +98,9 @@ protected void updateHotKeyPool() {
.stream()
.filter(it -> it.getType().equals(type))
.findAny().orElse(null);
this.hotKeysPool.put(hotKeyPair.getDescriptor(),button);
if(!hotKeyPair.getDescriptor().getTitle().equals("...")) {
this.hotKeysPool.put(hotKeyPair.getDescriptor(), button);
}
});
this.initResponseButtonPanel();
Window windowAncestor = SwingUtilities.getWindowAncestor(OutgoingNotificationPanel.this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ private JPanel getHeader(){
interactionPanel.add(openChatButton);
interactionPanel.add(hideButton);

this.interactButtonMap.clear();
this.interactButtonMap.put(HotKeyType.N_QUICK_RESPONSE,inviteMeButton);
this.interactButtonMap.put(HotKeyType.N_VISITE_HIDEOUT,visiteHideout);
this.interactButtonMap.put(HotKeyType.N_TRADE_PLAYER,tradeButton);
Expand Down Expand Up @@ -106,7 +107,9 @@ protected void updateHotKeyPool() {
.stream()
.filter(it -> it.getType().equals(type))
.findAny().orElse(null);
this.hotKeysPool.put(hotKeyPair.getDescriptor(),button);
if(!hotKeyPair.getDescriptor().getTitle().equals("...")) {
this.hotKeysPool.put(hotKeyPair.getDescriptor(), button);
}
});
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.mercury.platform.ui.components.panel.notification.controller;

import com.mercury.platform.shared.entity.message.ItemTradeNotificationDescriptor;
import com.mercury.platform.shared.entity.message.MercuryError;
import com.mercury.platform.shared.entity.message.NotificationDescriptor;
import com.mercury.platform.shared.store.MercuryStoreCore;
import com.mercury.platform.ui.misc.MercuryStoreUI;
Expand Down Expand Up @@ -63,9 +64,13 @@ public void showITH() {

private void copyItemNameToClipboard(@NonNull String itemName){
Timer timer = new Timer(30, action -> {
StringSelection selection = new StringSelection(itemName);
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
clipboard.setContents(selection, null);
try {
StringSelection selection = new StringSelection(itemName);
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
clipboard.setContents(selection, null);
}catch (IllegalStateException e){
MercuryStoreCore.errorHandlerSubject.onNext(new MercuryError(e));
}
});
timer.setRepeats(false);
timer.start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ public void mousePressed(MouseEvent e) {
MercuryStoreCore.hotKeySubject.subscribe(hotKey -> {
if (hotKeyAllowed) {
button.setBackground(AppThemeColor.BUTTON);
if (hotKey.getVirtualKeyCode() == 27) {
if (hotKey.getVirtualKeyCode() == 1) {
this.descriptor.setTitle("...");
this.descriptor.setVirtualKeyCode(0);
this.descriptor.setVirtualKeyCode(-1);
this.descriptor.setMenuPressed(false);
this.descriptor.setShiftPressed(false);
this.descriptor.setControlPressed(false);
Expand All @@ -51,7 +51,7 @@ public void mousePressed(MouseEvent e) {
this.descriptor.setShiftPressed(hotKey.isShiftPressed());
this.descriptor.setControlPressed(hotKey.isControlPressed());
}
button.setText(hotKey.getTitle());
button.setText(this.descriptor.getTitle());
hotKeyAllowed = false;
button.addMouseListener(mouseAdapter);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public void setState(ScaleState state){
this.scaleState = ScaleState.DEFAULT;
this.setContentPane(mainContainer);
this.setVisible(prevConstraints.visible);
this.processEResize = prevConstraints.processEResize;
this.setBackground(prevConstraints.bgColor);
this.inScaleSettings = false;
this.onScaleLock();
Expand All @@ -58,7 +57,6 @@ public void setState(ScaleState state){
this.isVisible(),
this.processEResize, this.getBackground()
);
this.processEResize = false;
initDefaultView();
this.setVisible(true);
this.onScaleUnlock();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void subscribe() {
this.pack();
}
});
MercuryStoreUI.closeMessage.subscribe(message -> {
MercuryStoreCore.removeNotificationSubject.subscribe(message -> {
if(message instanceof ItemTradeNotificationDescriptor) {
this.itemsGridPanel.remove((ItemTradeNotificationDescriptor) message);
if (itemsGridPanel.getActiveTabsCount() == 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,6 @@ public void subscribe() {
this.currentOffers.add(message);
}
this.addNotification(notificationPanel);
if(this.notificationPanels.size() > 1
&& this.config.get().getFlowDirections().equals(FlowDirections.UPWARDS)
&& !(notificationPanel instanceof ScannerNotificationPanel)){
this.setLocation(new Point(this.getLocation().x,this.getLocation().y - notificationPanel.getSize().height));
}
});
});
MercuryStoreCore.newScannerMessageSubject.subscribe(message -> {
Expand Down Expand Up @@ -154,8 +149,7 @@ private void addNotification(NotificationPanel notificationPanel){
this.pack();
this.repaint();
if(this.notificationPanels.size() > 1
&& this.config.get().getFlowDirections().equals(FlowDirections.UPWARDS)
&& !(notificationPanel instanceof ScannerNotificationPanel)){
&& this.config.get().getFlowDirections().equals(FlowDirections.UPWARDS)){
this.setLocation(new Point(this.getLocation().x,this.getLocation().y - notificationPanel.getSize().height));
}
}
Expand Down Expand Up @@ -221,17 +215,6 @@ protected JPanel defaultView(ComponentsFactory factory) {
.setComponentsFactory(factory)
.setController(new OutStubController())
.build());
root.add(this.providersFactory
.getProviderFor(NotificationType.SCANNER_MESSAGE)
.setData(testEngine.getRandomScannerMessage())
.setComponentsFactory(factory)
.setController(new ScannerStubController())
.build());
Timer packTimer = new Timer(10, action -> {
this.pack();
});
packTimer.start();

return root;
}

Expand Down
6 changes: 3 additions & 3 deletions app-ui/src/main/resources/notes/patch/patch-notes.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"version":"1.0.1.8.0",
"version":"1.0.1.8.1",
"notes":[
{
"title" : "Update",
"text" : "Just this week we've got more than 6000 new users which is insane. The update we're rolling out today affects every aspect of the application - basically a big rework of the core systems.\n\n- Notification panel rework (more info on reddit)\n- Overseer: new component \"Capture\".\n- All the buttons are now hotkeyable.\n- Chat scanner and history rework.\n- More responsive interface.\n\nA lot of work has been done, but that's it for today. Stay with us!",
"title" : "Hotfix",
"text" : "Hotfixes for the recent big update (check github/reddit):\n\n1. Now \"Escape\" is not a viable hotkey (lmao), will clear the hotkey instead.\n2. Fixed a bug with Item Grid boxes not being removed properly.\n3. Fixed a bug with panel resizing not working.\n4. Fixed Notification's Upwards Flow Direction option is not working properly.",
"image" : "",
"layout" : "VERTICAL"
}
Expand Down

0 comments on commit 5f38c4c

Please sign in to comment.