Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions lib/application/extension/adb_device_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ extension AdbDeviceExtension on AdbDevice {

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

bool get isUsb {
return !_ipRegex.hasMatch(serial);
}
bool get isUsb => !isNetwork;

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

IconData get statusIcon {
switch (status) {
Expand Down
5 changes: 4 additions & 1 deletion lib/init.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ Future<void> init() async {
// tray icon init
try {
await trayManager.setIcon('assets/tray/icon.png');
await trayManager.setTitle(_appName);
if (!Platform.isMacOS) {
// Don't show title on macOS (takes up more space in menu bar)
await trayManager.setTitle(_appName);
}
if (!Platform.isLinux) {
// tray_manager doesn't support this on linux
await trayManager.setToolTip(_appName);
Expand Down
2 changes: 1 addition & 1 deletion lib/presentation/devices/device_row.dart
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class _DeviceRowState extends AppModuleState<DeviceRow> with SingleTickerProvide
children: [
DropDownButton(
items: [
if (widget.device.isUsb) ...[
if (widget.device.isUsb && widget.device.isReady) ...[
MenuFlyoutItem(
onPressed: _switchToNetwork,
leading: const Icon(WindowsIcons.wifi),
Expand Down
Loading