Skip to content

Commit 1be0223

Browse files
committed
Fix some emulators not starting for new sdk debugger
Fixes #167
1 parent 4d28d13 commit 1be0223

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
* Fix some emulators not starting for new sdk debugger. #167
6+
7+
## 1.22.0
8+
59
* Change `lsp-dart-dap-vm-additional-args` from string to vector type following debugger server changes. #136
610
* Check for dart related file extension during hot-reload/restart when auto-save enabled. #134
711
* Run flutter proccess if not already running during hot-restart/hot-reload. #143

lsp-dart-dap.el

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ Required to support 'Inspect Widget'."
204204
;; Flutter
205205

206206
(declare-function all-the-icons-faicon "ext:all-the-icons")
207+
(declare-function all-the-icons-material "ext:all-the-icons")
207208

208209
(defun lsp-dart-dap--device-label (id name is-device platform)
209210
"Return a friendly label for device with ID, NAME IS-DEVICE and PLATFORM.
@@ -219,6 +220,9 @@ Check for icons if supports it."
219220
(pcase platform
220221
("web" (concat (all-the-icons-faicon "chrome" :face 'all-the-icons-blue :v-adjust 0.0) " " type-text " - " device-name))
221222
("android" (concat (all-the-icons-faicon "android" :face 'all-the-icons-green :v-adjust 0.0) " " type-text " - " device-name))
223+
("linux" (concat (all-the-icons-faicon "linux" :face 'all-the-icons-yellow :v-adjust 0.0) " " type-text " - " device-name))
224+
("macos" (concat (all-the-icons-material "laptop_mac" :face 'all-the-icons-lsilver :v-adjust 0.0) " " type-text " - " device-name))
225+
("windows" (concat (all-the-icons-faicon "windows" :face 'all-the-icons-blue :v-adjust 0.0) " " type-text " - " device-name))
222226
("ios" (concat (all-the-icons-faicon "apple" :face 'all-the-icons-lsilver :v-adjust 0.0) " " type-text " - " device-name))
223227
(_ default))
224228
default)))

lsp-dart-flutter-daemon.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ of this command."
155155
"device.getDevices"
156156
nil
157157
(-lambda (devices)
158-
(if-let (emulator-running? (-first (-lambda ((&FlutterDaemonDevice :emulator-id?)) (string= emulator-id? id)) (append devices nil)))
159-
(funcall callback device)
158+
(if-let (emulator-running (-first (-lambda ((&FlutterDaemonDevice :emulator-id?)) (string= emulator-id? id)) (append devices nil)))
159+
(funcall callback emulator-running)
160160
(-let* ((params (lsp-make-flutter-daemon-emulator-launch :emulator-id id)))
161161
(add-to-list 'lsp-dart-flutter-daemon-device-added-listeners
162162
(cons id (list :callback callback)))

0 commit comments

Comments
 (0)