Patrick Glavin 6 lat temu
rodzic
commit
ee8a40c78d

+ 14
- 0
Client/src/main/java/DMGetter.java Wyświetl plik

@@ -0,0 +1,14 @@
1
+public class DMGetter implements Runnable{
2
+    private User user;
3
+    private YouAreEll webber;
4
+
5
+    public DMGetter(User user, YouAreEll webber) {
6
+        this.user = user;
7
+        this.webber = webber;
8
+    }
9
+
10
+    public void run() {
11
+        String results = webber.get_DMs(user);
12
+        SimpleShell.prettyPrintMessages(results);
13
+    }
14
+}

+ 2
- 2
Client/src/main/java/SimpleShell.java Wyświetl plik

@@ -120,8 +120,8 @@ public class SimpleShell {
120 120
                 // you need to add a bunch more.
121 121
 
122 122
                 if (list.contains("dms")) {
123
-                    String results = webber.get_DMs(user);
124
-                    SimpleShell.prettyPrintMessages(results);
123
+                    Thread thread = new Thread(new DMGetter(user, webber));
124
+                    thread.start();
125 125
                     continue;
126 126
                 }
127 127