Skip to content

Commit 107c7c8

Browse files
committed
fix: key sound, custom reorder, vpn detection, and badge push conflict
1 parent 4a36f64 commit 107c7c8

11 files changed

Lines changed: 111 additions & 73 deletions

File tree

.github/workflows/badges.yml

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- master
77
schedule:
8-
- cron: '0 0 * * 0' # Run weekly on Sunday at midnight
8+
- cron: '0 0 * * *' # Run daily at midnight
99
workflow_dispatch:
1010

1111
permissions:
@@ -73,8 +73,36 @@ jobs:
7373
color: '${{ steps.test_stats.outputs.color }}'
7474
path: '.github/badges/tests.svg'
7575

76+
- name: Fetch GitHub Stats
77+
id: stats
78+
run: python3 .github/scripts/fetch_stats.py
79+
80+
- name: Create Version Badge
81+
uses: emibcn/badge-action@v2.0.2
82+
with:
83+
label: 'Version'
84+
status: '${{ steps.stats.outputs.version }}'
85+
color: '7C4DFF'
86+
path: '.github/badges/version.svg'
87+
88+
- name: Create Downloads Badge
89+
uses: emibcn/badge-action@v2.0.2
90+
with:
91+
label: 'Downloads'
92+
status: '${{ steps.stats.outputs.downloads }}'
93+
color: '7C4DFF'
94+
path: '.github/badges/downloads.svg'
95+
96+
- name: Create Stars Badge
97+
uses: emibcn/badge-action@v2.0.2
98+
with:
99+
label: 'Stars'
100+
status: '${{ steps.stats.outputs.stars }}'
101+
color: '7C4DFF'
102+
path: '.github/badges/stars.svg'
103+
76104
- name: Commit and Push Badges
77105
uses: stefanzweifel/git-auto-commit-action@v5
78106
with:
79-
commit_message: "chore: auto-update test and coverage badges"
80-
file_pattern: ".github/badges/coverage.svg .github/badges/tests.svg"
107+
commit_message: "chore: auto-update badges"
108+
file_pattern: ".github/badges/coverage.svg .github/badges/tests.svg .github/badges/version.svg .github/badges/downloads.svg .github/badges/stars.svg"

.github/workflows/stats_badges.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

android/app/src/main/java/com/leanbitlab/ltvL/MainActivity.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {
169169
result.success(launchWatchNextProgram(intentUri));
170170
}
171171
case "getPackageName" -> result.success(getPackageName());
172+
case "playClickSound" -> {
173+
getWindow().getDecorView().playSoundEffect(android.view.SoundEffectConstants.CLICK);
174+
result.success(null);
175+
}
172176
default -> throw new IllegalArgumentException();
173177
}
174178
});

android/app/src/main/java/com/leanbitlab/ltvL/NetworkUtils.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ public static Map<String, Object> getNetworkCapabilitiesInformation(Context cont
4545
hasInternetAccess = hasNetworkAccess;
4646
}
4747

48-
if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) {
48+
if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_VPN)) {
49+
networkType = NETWORK_TYPE_VPN;
50+
}
51+
else if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) {
4952
networkType = NETWORK_TYPE_CELLULAR;
5053
}
5154
else if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)) {
@@ -73,9 +76,6 @@ else if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)) {
7376

7477
networkType = NETWORK_TYPE_WIFI;
7578
}
76-
else if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_VPN)) {
77-
networkType = NETWORK_TYPE_VPN;
78-
}
7979
else if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_ETHERNET)) {
8080
networkType = NETWORK_TYPE_WIRED;
8181
}

android/app/src/main/java/me/efesser/flauncher/MainActivity.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {
169169
result.success(launchWatchNextProgram(intentUri));
170170
}
171171
case "getPackageName" -> result.success(getPackageName());
172+
case "playClickSound" -> {
173+
getWindow().getDecorView().playSoundEffect(android.view.SoundEffectConstants.CLICK);
174+
result.success(null);
175+
}
172176
default -> throw new IllegalArgumentException();
173177
}
174178
});

android/app/src/main/java/me/efesser/flauncher/NetworkUtils.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ public static Map<String, Object> getNetworkCapabilitiesInformation(Context cont
4545
hasInternetAccess = hasNetworkAccess;
4646
}
4747

48-
if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) {
48+
if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_VPN)) {
49+
networkType = NETWORK_TYPE_VPN;
50+
}
51+
else if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) {
4952
networkType = NETWORK_TYPE_CELLULAR;
5053
}
5154
else if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)) {
@@ -73,9 +76,6 @@ else if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)) {
7376

7477
networkType = NETWORK_TYPE_WIFI;
7578
}
76-
else if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_VPN)) {
77-
networkType = NETWORK_TYPE_VPN;
78-
}
7979
else if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_ETHERNET)) {
8080
networkType = NETWORK_TYPE_WIRED;
8181
}

lib/actions.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* along with this program. If not, see <https://www.gnu.org/licenses/>.
1717
*/
1818

19+
import 'package:flauncher/flauncher_channel.dart';
1920
import 'package:flauncher/providers/apps_service.dart';
2021
import 'package:flauncher/providers/launcher_state.dart';
2122
import 'package:flauncher/providers/settings_service.dart';
@@ -34,6 +35,7 @@ class SoundFeedbackDirectionalFocusAction extends DirectionalFocusAction {
3435

3536
SettingsService settingsService = context.read<SettingsService>();
3637
if (settingsService.appKeyClickEnabled) {
38+
FLauncherChannel().playClickSound();
3739
Feedback.forTap(context);
3840
} else {
3941
silentForTap(context);

lib/flauncher_channel.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,14 @@ class FLauncherChannel {
100100
Future<void> openDefaultLauncherSettings() async =>
101101
await _methodChannel.invokeMethod("openDefaultLauncherSettings");
102102

103+
Future<void> playClickSound() async {
104+
try {
105+
await _methodChannel.invokeMethod("playClickSound");
106+
} catch (_) {
107+
// Ignore error in non-Android or test environments
108+
}
109+
}
110+
103111
Future<void> startAmbientMode() async => await _methodChannel.invokeMethod("startAmbientMode");
104112

105113
void addAppsChangedListener(void Function(Map<String, dynamic>) listener) =>

lib/l10n/app_localizations_es.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class AppLocalizationsEs extends AppLocalizations {
77
AppLocalizationsEs([String locale = 'es']) : super(locale);
88

99
@override
10-
String get aboutFlauncher => 'Acerca de FLauncher';
10+
String get aboutFlauncher => 'Acerca de LTvLauncher';
1111

1212
@override
1313
String get addCategory => 'Agregar categoría';
@@ -88,7 +88,7 @@ class AppLocalizationsEs extends AppLocalizations {
8888
String get gradient => 'Gradiente';
8989

9090
@override
91-
String get favoriteApps => 'Favorite Apps';
91+
String get favoriteApps => 'Apps Favoritas';
9292

9393
@override
9494
String get grid => 'Cuadrícula';
@@ -146,7 +146,7 @@ class AppLocalizationsEs extends AppLocalizations {
146146

147147
@override
148148
String removeFrom(String name) {
149-
return 'Remover de $name';
149+
return 'Eliminar de $name';
150150
}
151151

152152
@override
@@ -156,10 +156,10 @@ class AppLocalizationsEs extends AppLocalizations {
156156
String get reorder => 'Reordenar';
157157

158158
@override
159-
String get row => 'Row';
159+
String get row => 'Fila';
160160

161161
@override
162-
String get rowHeight => 'Row height';
162+
String get rowHeight => 'Altura de fila';
163163

164164
@override
165165
String get save => 'Guardar';
@@ -233,13 +233,13 @@ class AppLocalizationsEs extends AppLocalizations {
233233
String get withEllipsisAddTo => 'Añadir a...';
234234

235235
@override
236-
String get timeBasedWallpaper => 'Time based wallpaper';
236+
String get timeBasedWallpaper => 'Fondo de pantalla según hora';
237237

238238
@override
239-
String get pickDayWallpaper => 'Pick day wallpaper';
239+
String get pickDayWallpaper => 'Elegir fondo de pantalla diurno';
240240

241241
@override
242-
String get pickNightWallpaper => 'Pick night wallpaper';
242+
String get pickNightWallpaper => 'Elegir fondo de pantalla nocturno';
243243

244244
@override
245245
String get accessibility => 'Accesibilidad';

lib/providers/apps_service.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,7 @@ class AppsService extends ChangeNotifier {
636636
List<AppsCategoriesCompanion> orderedAppCategories = [];
637637

638638
for (int i = 0; i < applications.length; ++i) {
639+
applications[i].categoryOrders[categoryFound.id] = i;
639640
orderedAppCategories.add(AppsCategoriesCompanion(
640641
categoryId: Value(categoryFound.id),
641642
appPackageName: Value(applications[i].packageName),

0 commit comments

Comments
 (0)