Skip to content

Commit 315dac0

Browse files
authored
Merge pull request #78 from Codertainment/feature/minor_fixes
Minor fixes
2 parents 32cf814 + 4c0a6a9 commit 315dac0

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

lib/application/extension/adb_device_extension.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@ extension AdbDeviceExtension on AdbDevice {
1212

1313
String? get codename => metadata?["device"];
1414

15-
bool get isUsb {
16-
return !_ipRegex.hasMatch(serial);
17-
}
15+
bool get isUsb => !isNetwork;
1816

19-
bool get isNetwork => !isUsb;
17+
bool get isNetwork => _ipRegex.hasMatch(serial) || serial.contains("_adb-tls-connect._tcp");
2018

2119
IconData get statusIcon {
2220
switch (status) {

lib/init.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ Future<void> init() async {
3535
// tray icon init
3636
try {
3737
await trayManager.setIcon('assets/tray/icon.png');
38-
await trayManager.setTitle(_appName);
38+
if (!Platform.isMacOS) {
39+
// Don't show title on macOS (takes up more space in menu bar)
40+
await trayManager.setTitle(_appName);
41+
}
3942
if (!Platform.isLinux) {
4043
// tray_manager doesn't support this on linux
4144
await trayManager.setToolTip(_appName);

lib/presentation/devices/device_row.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ class _DeviceRowState extends AppModuleState<DeviceRow> with SingleTickerProvide
202202
children: [
203203
DropDownButton(
204204
items: [
205-
if (widget.device.isUsb) ...[
205+
if (widget.device.isUsb && widget.device.isReady) ...[
206206
MenuFlyoutItem(
207207
onPressed: _switchToNetwork,
208208
leading: const Icon(WindowsIcons.wifi),

0 commit comments

Comments
 (0)