Add Ability to Logout #50

Merged
kske merged 7 commits from f/logout into develop 2020-09-27 15:48:13 +02:00

Additionally added keyboard shortcuts and system commands for logout, exit and switching to the settings scene

Additionally added keyboard shortcuts and system commands for logout, exit and switching to the settings scene
delvh added this to the v0.2-beta milestone 2020-09-25 22:02:51 +02:00
delvh added the
client
L
labels 2020-09-25 22:02:51 +02:00
delvh self-assigned this 2020-09-25 22:02:51 +02:00
delvh requested review from mpk 2020-09-25 22:04:02 +02:00
delvh requested review from kske 2020-09-25 22:04:03 +02:00
kske requested changes 2020-09-26 18:23:36 +02:00
kske left a comment
Owner

Looks good to me, please fix the cosmetics though 😆

Looks good to me, please fix the cosmetics though 😆
@ -40,6 +40,10 @@ public final class LocalDB implements EventListener {
private CacheMap cacheMap = new CacheMap();
private String authToken;
// auto save Timer

This should be // Auto save time.

This should be `// Auto save time`.
Poster
Owner

you mean // Auto save timer?

you mean `// Auto save timer`?
@ -170,1 +174,3 @@
new Timer("LocalDB Autosave", true).schedule(new TimerTask() {
if (autoSaveRestart) {
// A logout happened so the timer should be restarted

Maybe move the comment above the if statement.

Maybe move the comment above the `if` statement.
delvh marked this conversation as resolved
@ -215,0 +229,4 @@
* @since Envoy Client v0.2-beta
*/
@Event(eventType = Logout.class, priority = 100)
public void onLogout() {

Why is this public?

Why is this public?
delvh marked this conversation as resolved
@ -215,0 +238,4 @@
authToken = null;
chats.clear();
lastSync = Instant.EPOCH;
cacheMap.getMap().forEach((key, cache) -> cache.clear());

Please remove the comment and add a clearing method to CacheMap.

Please remove the comment and add a clearing method to `CacheMap`.
delvh marked this conversation as resolved
@ -0,0 +5,4 @@
/**
* Indicates that a logout has been requested.
*
* @author leon

Fix your @author tag.

Fix your `@author` tag.
delvh marked this conversation as resolved
@ -0,0 +10,4 @@
* @author Leon Hofmeister
* @since Envoy Client v0.2-beta
*/
public class AlertHelper {

Make this final.

Make this `final`.
delvh marked this conversation as resolved
@ -0,0 +13,4 @@
import dev.kske.eventbus.EventBus;
/**
* Contains methods that have a direct impact on the user.

What on earth does that even mean?

What on earth does that even mean?
Poster
Owner

Changed it now.
If you don't like it, suggest a better alternative.
I cannot think of one.

Changed it now. If you don't like it, suggest a better alternative. I cannot think of one.
@ -0,0 +18,4 @@
* @author Leon Hofmeister
* @since Envoy Client v0.2-beta
*/
public class ShutdownHelper {

Make this final.

Make this `final`.
delvh marked this conversation as resolved
delvh requested review from kske 2020-09-26 21:38:49 +02:00
kske approved these changes 2020-09-27 15:48:00 +02:00
kske merged commit c7ee545ee2 into develop 2020-09-27 15:48:12 +02:00
kske deleted branch f/logout 2020-09-27 15:48:19 +02:00
This repo is archived. You cannot comment on pull requests.
There is no content yet.