Skip to content

Commit

Permalink
Merge pull request #2600 from BlueBubblesApp/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
zlshames committed Dec 2, 2023
2 parents 10be464 + ad8b51b commit 5221bed
Show file tree
Hide file tree
Showing 18 changed files with 181 additions and 93 deletions.
10 changes: 5 additions & 5 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,36 +75,36 @@ android {
productFlavors {
joel {
dimension "app"
resValue "string", "app_name", "BlueBubbles Dev (Joel)"
resValue "string", "app_name_en", "BlueBubbles Dev (Joel)"
resValue "color", "ic_launcher_background", "#4c49de"
resValue "string", "file_provider", "com.bluebubbles.messaging.joel.fileprovider"
applicationId "com.bluebubbles.messaging.joel"
}
tanay {
dimension "app"
resValue "string", "app_name", "BlueBubbles (Tanay Special Sauce)"
resValue "string", "app_name_en", "BlueBubbles (Tanay Special Sauce)"
resValue "color", "ic_launcher_background", "#4c49de"
resValue "string", "file_provider", "com.bluebubbles.messaging.tanay.fileprovider"
applicationId "com.bluebubbles.messaging.tanay"
}
alpha {
dimension "app"
resValue "string", "app_name", "BlueBubbles (Alpha)"
resValue "string", "app_name_en", "BlueBubbles (Alpha)"
resValue "color", "ic_launcher_background", "#49dbde"
resValue "string", "file_provider", "com.bluebubbles.messaging.alpha.fileprovider"
applicationId "com.bluebubbles.messaging.alpha"
}
beta {
dimension "app"
resValue "string", "app_name", "BlueBubbles (Beta)"
resValue "string", "app_name_en", "BlueBubbles (Beta)"
resValue "color", "ic_launcher_background", "#4990de"
resValue "string", "file_provider", "com.bluebubbles.messaging.beta.fileprovider"
applicationId "com.bluebubbles.messaging.beta"
}
prod {
getIsDefault().set(true)
dimension "app"
resValue "string", "app_name", "BlueBubbles"
resValue "string", "app_name_en", "BlueBubbles"
resValue "color", "ic_launcher_background", "#4990de"
resValue "string", "file_provider", "com.bluebubbles.messaging.fileprovider"
applicationId "com.bluebubbles.messaging"
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
android:allowBackup="false"
android:name=".Application"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:label="@string/app_name_en"
android:appCategory="social"
android:requestLegacyExternalStorage="true"
android:debuggable="false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,26 @@ public void Handle() {
.addOnCompleteListener(new OnCompleteListener<String>() {
@Override
public void onComplete(@NonNull Task<String> task) {
if (task.getResult() == null || !task.isSuccessful()) {
Log.d(TAG, "getInstanceId failed", task.getException());
try {
try {
if (task.getResult() == null || !task.isSuccessful()) {
Log.d(TAG, "getInstanceId failed", task.getException());
try {

result.error("Failed to authenticate", "getInstanceId failed", task.getException());
} catch (IllegalStateException e) {
result.error("Failed to authenticate", "getInstanceId failed", task.getException());
} catch (IllegalStateException e) {

}
return;
}
return;
}

String token = task.getResult();
Log.d("FCM", "token: " + token);
try {
result.success(token);
} catch (IllegalStateException e) {
String token = task.getResult();
Log.d("FCM", "token: " + token);
try {
result.success(token);
} catch (IllegalStateException e) {
}
} catch (Exception e) {
result.error("Failed to authenticate", "FCM not available!", "");
}
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ public void Handle() {
.setCategory(NotificationCompat.CATEGORY_CALL)
// Set the priority to high since it's a message they should see
.setPriority(NotificationCompat.PRIORITY_MAX)
// Sets the intent for when it's clicked
.setContentIntent(openIntent)
// Set the content for the notification
.setContentTitle(title)
.setContentText(body)
Expand All @@ -114,6 +112,11 @@ public void Handle() {
// Set the color. This is the blue primary color
.setColor(4888294);

if (callUuid != null) {
// Sets the intent for when it's clicked
notificationBuilder.setContentIntent(openIntent);
}

Log.d(TAG, "Creating notification for FaceTime: " + callUuid);
NotificationManagerCompat notificationManagerCompat = NotificationManagerCompat.from(context);

Expand Down
14 changes: 14 additions & 0 deletions assets/changelog/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

Below are the last few BlueBubbles App release changelogs

## v1.12.6

This is a hotfix update bringing bug fixes to recent issues,

### Changes

- Fixes issue with detecting and showing FaceTime notifications.
- Fixes issue where name would appear as "App Killer Manager" on French devices.
- Fixes issue where images would be pixelated when zooming in.
- Removes blurred background for message popups when on High Performance Mode.
- Fixes some issues with Firebase causing app crashes.
- Adds `ngrok-skip-browser-warning` header and custom User-Agent to fix Ngrok Tunnel compatibility issues.
- Fixes FindMy Friends issues for tablets and large-screen devices

## v1.12.5

This update fixes bugs (especially on Desktop) and brings some of the latest server's features to the client apps.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -448,14 +448,14 @@ class _MessagePopupState extends OptimizedState<MessagePopup> with SingleTickerP
GestureDetector(
onTap: popDetails,
child: iOS
? BackdropFilter(
? (ss.settings.highPerfMode.value ? Container(color: context.theme.colorScheme.background.withOpacity(0.8)) : BackdropFilter(
filter: ImageFilter.blur(
sigmaX: kIsDesktop && ss.settings.windowEffect.value != WindowEffect.disabled ? 10 : 30,
sigmaY: kIsDesktop && ss.settings.windowEffect.value != WindowEffect.disabled ? 10 : 30),
child: Container(
color: context.theme.colorScheme.properSurface.withOpacity(0.3),
),
)
))
: null,
),
if (iOS)
Expand Down
63 changes: 34 additions & 29 deletions lib/app/layouts/findmy/findmy_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import 'package:flutter_map_marker_popup/flutter_map_marker_popup.dart';
import 'package:get/get.dart' hide Response;
import 'package:latlong2/latlong.dart';
import 'package:sliding_up_panel2/sliding_up_panel2.dart';
import 'package:universal_io/io.dart';

class FindMyPage extends StatefulWidget {
const FindMyPage({Key? key}) : super(key: key);
Expand Down Expand Up @@ -120,19 +121,21 @@ class _FindMyPageState extends OptimizedState<FindMyPage> with SingleTickerProvi
anchorPos: AnchorPos.align(AnchorAlign.top),
);
}
LocationPermission granted = await Geolocator.checkPermission();
if (granted == LocationPermission.denied) {
granted = await Geolocator.requestPermission();
}
if (granted == LocationPermission.whileInUse || granted == LocationPermission.always) {
location = await Geolocator.getCurrentPosition();
buildLocationMarker(location!);
locationSub = Geolocator.getPositionStream().listen((event) {
setState(() {
buildLocationMarker(event);
if (!(Platform.isLinux && !kIsWeb)) {
LocationPermission granted = await Geolocator.checkPermission();
if (granted == LocationPermission.denied) {
granted = await Geolocator.requestPermission();
}
if (granted == LocationPermission.whileInUse || granted == LocationPermission.always) {
location = await Geolocator.getCurrentPosition();
buildLocationMarker(location!);
locationSub = Geolocator.getPositionStream().listen((event) {
setState(() {
buildLocationMarker(event);
});
});
});
mapController.move(LatLng(location!.latitude, location!.longitude), 10);
mapController.move(LatLng(location!.latitude, location!.longitude), 10);
}
}
setState(() {
fetching = false;
Expand Down Expand Up @@ -690,12 +693,12 @@ class _FindMyPageState extends OptimizedState<FindMyPage> with SingleTickerProvi
if (context.isPhone) {
return buildNormal(context, devicesBodySlivers, friendsBodySlivers);
}
return buildDesktop(context, devicesBodySlivers, friendsBodySlivers);
return buildTabletLayout(context, devicesBodySlivers, friendsBodySlivers);
},
));
}

Widget buildDesktop(BuildContext context, List<SliverList> devicesBodySlivers, List<SliverList> friendsBodySlivers) {
Widget buildTabletLayout(BuildContext context, List<SliverList> devicesBodySlivers, List<SliverList> friendsBodySlivers) {
return Obx(
() => Scaffold(
backgroundColor: context.theme.colorScheme.background.themeOpacity(context),
Expand Down Expand Up @@ -742,23 +745,24 @@ class _FindMyPageState extends OptimizedState<FindMyPage> with SingleTickerProvi
),
),
),
SizedBox(
height: appWindow.titleBarHeight,
child: AbsorbPointer(
child: Row(children: [
Expanded(child: Container()),
ClipRect(
child: BackdropFilter(
filter: ImageFilter.blur(sigmaY: 2, sigmaX: 2),
child: Container(
height: appWindow.titleBarHeight,
width: appWindow.titleBarButtonSize.width * 3,
color: context.theme.colorScheme.properSurface.withOpacity(0.5)),
if (kIsDesktop)
SizedBox(
height: appWindow.titleBarHeight,
child: AbsorbPointer(
child: Row(children: [
Expanded(child: Container()),
ClipRect(
child: BackdropFilter(
filter: ImageFilter.blur(sigmaY: 2, sigmaX: 2),
child: Container(
height: appWindow.titleBarHeight,
width: appWindow.titleBarButtonSize.width * 3,
color: context.theme.colorScheme.properSurface.withOpacity(0.5)),
),
),
),
]),
]),
),
),
),
],
),
),
Expand Down Expand Up @@ -1209,6 +1213,7 @@ class _FindMyPageState extends OptimizedState<FindMyPage> with SingleTickerProvi
mapController: mapController,
options: MapOptions(
zoom: 5.0,
minZoom: 1.0,
maxZoom: 18.0,
center: location == null ? null : LatLng(location!.latitude, location!.longitude),
onTap: (_, __) => popupController.hideAllPopups(),
Expand Down
1 change: 1 addition & 0 deletions lib/app/layouts/fullscreen_media/fullscreen_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ class _FullscreenImageState extends OptimizedState<FullscreenImage> with Automat
errorBuilder: (context, object, stacktrace) => Center(
child: Text("Failed to display image", style: context.theme.textTheme.bodyLarge)
),
filterQuality: FilterQuality.high,
),
) : hasError ? Center(
child: Text("Failed to load image", style: context.theme.textTheme.bodyLarge)
Expand Down
30 changes: 21 additions & 9 deletions lib/app/layouts/settings/pages/advanced/private_api_panel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -293,15 +293,27 @@ class _PrivateAPIPanelState extends CustomState<PrivateAPIPanel, void, PrivateAP
),
AnimatedSizeAndFade.showHide(
show: ss.isMinVenturaSync && ss.serverDetailsSync().item4 >= 148,
child: SettingsSwitch(
title: "Up Arrow for Quick Edit",
initialVal: ss.settings.editLastSentMessageOnUpArrow.value,
onChanged: (bool val) {
ss.settings.editLastSentMessageOnUpArrow.value = val;
saveSettings();
},
subtitle: "Press the Up Arrow to begin editing the last message you sent",
backgroundColor: tileColor,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
color: tileColor,
child: Padding(
padding: const EdgeInsets.only(left: 15.0),
child: SettingsDivider(color: context.theme.colorScheme.surfaceVariant),
),
),
SettingsSwitch(
title: "Up Arrow for Quick Edit",
initialVal: ss.settings.editLastSentMessageOnUpArrow.value,
onChanged: (bool val) {
ss.settings.editLastSentMessageOnUpArrow.value = val;
saveSettings();
},
subtitle: "Press the Up Arrow to begin editing the last message you sent",
backgroundColor: tileColor,
),
],
),
),
AnimatedSizeAndFade.showHide(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,13 @@ class _ConversationPanelState extends OptimizedState<ConversationPanel> {
title: "Send/Receve Sound Volume",
subtitle: "Controls the volume of the send and receive sounds",
),
Container(
color: tileColor,
child: Padding(
padding: const EdgeInsets.only(left: 65.0),
child: SettingsDivider(color: context.theme.colorScheme.surfaceVariant),
),
),
Obx(() => SettingsSlider(
startingVal: ss.settings.soundVolume.value.toDouble(),
min: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,14 @@ class _ServerManagementPanelState extends CustomState<ServerManagementPanel, voi
}
},
)),
if (!kIsWeb)
Container(
color: tileColor,
child: Padding(
padding: const EdgeInsets.only(left: 65.0),
child: SettingsDivider(color: context.theme.colorScheme.surfaceVariant),
),
),
if (!kIsWeb)
Obx(() => ss.settings.localhostPort.value != null
? SettingsSwitch(
Expand Down
2 changes: 1 addition & 1 deletion lib/helpers/types/helpers/file_helpers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Future<File?> saveImageFromUrl(String guid, String url) async {
final filename = getFilenameFromUri(url);

try {
final response = await http.dio.get(url, options: Options(responseType: ResponseType.bytes, headers: ss.settings.customHeaders));
final response = await http.dio.get(url, options: Options(responseType: ResponseType.bytes, headers: http.headers));

Directory baseDir = Directory("${Attachment.baseDirectory}/$guid");
if (!await baseDir.exists()) {
Expand Down
17 changes: 17 additions & 0 deletions lib/services/backend/action_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -323,4 +323,21 @@ class ActionHandler extends GetxService {
await notif.createIncomingFaceTimeNotification(callUuid, caller, chatIcon, isAudio);
}
}

Future<void> handleIncomingFaceTimeCallLegacy(Map<String, dynamic> data) async {
Logger.info("Handling incoming FaceTime call (legacy)");
await cs.init();
String? address = data["caller"];
String? caller = address;
Uint8List? chatIcon;

// Find the contact info for the caller
// Load the contact's avatar & name
if (address != null) {
Contact? contact = cs.getContact(address);
chatIcon = contact?.avatar;
caller = contact?.displayName ?? caller;
await notif.createIncomingFaceTimeNotification(null, caller!, chatIcon, false);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@ class MethodChannelService extends GetxService {
isRunning = false;
}
return true;
case "incoming-facetime":
await storeStartup.future;
Logger.info("Received legacy incoming facetime from FCM");
Map<String, dynamic> data = jsonDecode(call.arguments.toString().replaceAll('\\"', '<').replaceAll('"', '').replaceAll('<', '"'));
await ActionHandler().handleIncomingFaceTimeCallLegacy(data);
return true;
case "ft-call-status-changed":
await storeStartup.future;
Logger.info("Received facetime call status change from FCM");
Expand Down
Loading

0 comments on commit 5221bed

Please sign in to comment.