Skip to content

Commit

Permalink
Hide bandwidth widget and small other changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jigar-f committed May 27, 2024
1 parent 9f8bee2 commit 5000d7c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ios/Runner/Lantern/Models/SessionModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class SessionModel: BaseModel<InternalsdkSessionModel> {
as? [String: Any]
{
try invoke("updateStats", dataDict)
logger.debug("New data received: \(dataDict)")
logger.debug("updateStats data received: \(dataDict)")
}
} catch {
logger.debug("Failed to deserialize JSON data: \(error)")
Expand Down
5 changes: 2 additions & 3 deletions lib/account/language.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import 'package:intl/intl.dart';
import 'package:lantern/common/common.dart';
import 'package:lantern/i18n/localization_constants.dart';
import 'package:sentry_flutter/sentry_flutter.dart';

@RoutePage<void>(name: 'Language')
class Language extends StatelessWidget {
Language({Key? key}) : super(key: key);
const Language({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand All @@ -15,7 +14,7 @@ class Language extends StatelessWidget {
body: sessionModel
.language((BuildContext context, String currentLang, Widget? child) {
// Splint language by just code
final countryCode= currentLang;
final countryCode= checkSupportedLanguages(currentLang) ;
return ListView.builder(
itemCount: languages.length,
itemBuilder: (BuildContext context, int index) {
Expand Down
7 changes: 7 additions & 0 deletions lib/i18n/localization_constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ const languages = [
'bn_BD',
];

String checkSupportedLanguages(String language){
if(languages.contains(language)){
return language;
}
return 'en_Us';
}

String displayLanguage(String languageCode) {
if (languageCode == 'ar_EG') {
return 'العربية';
Expand Down
6 changes: 3 additions & 3 deletions lib/vpn/vpn_tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'vpn_status.dart';
import 'vpn_switch.dart';

class VPNTab extends StatelessWidget {
VPNTab({Key? key}) : super(key: key);
const VPNTab({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -44,12 +44,12 @@ class VPNTab extends StatelessWidget {
children: [
VPNStatus(),
const CDivider(height: 32.0),
ServerLocationWidget(),
const ServerLocationWidget(),
if (Platform.isAndroid) ...{
const CDivider(height: 32.0),
SplitTunnelingWidget(),
},
if (!proUser) const VPNBandwidth(),
if (!proUser&& Platform.isAndroid) const VPNBandwidth(),
],
),
),
Expand Down

0 comments on commit 5000d7c

Please sign in to comment.