Merge branch 'main' of gitlab.com:mysocialportal/relatica
|
@ -1,42 +1,43 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="social.myportal.relatica">
|
||||
package="social.myportal.relatica">
|
||||
|
||||
<application
|
||||
android:label="relatica"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher_round"
|
||||
android:label="Relatica">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
android:name=".MainActivity"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:exported="true"
|
||||
android:hardwareAccelerated="true"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
while the Flutter UI initializes. After that, this theme continues
|
||||
to determine the Window background behind the Flutter UI. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme"/>
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme" />
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2"/>
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
</application>
|
||||
<queries>
|
||||
<intent>
|
||||
<action android:name="android.intent.action.VIEW"/>
|
||||
<data android:scheme="https"/>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<data android:scheme="https" />
|
||||
</intent>
|
||||
</queries>
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
</manifest>
|
||||
|
|
BIN
android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 619 B |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 911 B |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 619 B |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 911 B |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 4.4 KiB |
|
@ -17,12 +17,12 @@ import 'services/notifications_manager.dart';
|
|||
import 'services/setting_service.dart';
|
||||
import 'services/timeline_manager.dart';
|
||||
import 'utils/app_scrolling_behavior.dart';
|
||||
import 'utils/old_android_letsencrypte_cert.dart';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
// await dotenv.load(fileName: '.env');
|
||||
Logger.root.level = Level.FINER;
|
||||
|
||||
Logger.root.onRecord.listen((event) {
|
||||
final logName = event.loggerName.isEmpty ? 'ROOT' : event.loggerName;
|
||||
final msg =
|
||||
|
@ -30,6 +30,7 @@ void main() async {
|
|||
print(msg);
|
||||
});
|
||||
|
||||
await fixLetsEncryptCertOnOldAndroid();
|
||||
await dependencyInjectionInitialization();
|
||||
|
||||
runApp(const App());
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../controls/standard_appbar.dart';
|
||||
import '../controls/timeline/timeline_panel.dart';
|
||||
import '../globals.dart';
|
||||
import '../models/TimelineIdentifiers.dart';
|
||||
import '../routes.dart';
|
||||
import '../services/network_status_service.dart';
|
||||
import '../services/timeline_manager.dart';
|
||||
|
||||
class UserPostsScreen extends StatelessWidget {
|
||||
final String userId;
|
||||
|
@ -11,10 +16,39 @@ class UserPostsScreen extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final nss = getIt<NetworkStatusService>();
|
||||
final manager = context.watch<TimelineManager>();
|
||||
final timeline = TimelineIdentifiers.profile(userId);
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('User Posts'),
|
||||
appBar: StandardAppBar.build(
|
||||
context,
|
||||
'User Posts',
|
||||
actions: [
|
||||
ValueListenableBuilder(
|
||||
valueListenable: nss.timelineLoadingStatus,
|
||||
builder: (context2, executing, _) {
|
||||
if (executing) {
|
||||
final theme = Theme.of(context);
|
||||
final size = theme.appBarTheme.actionsIconTheme?.size ??
|
||||
theme.iconTheme.size ??
|
||||
24;
|
||||
return Center(
|
||||
child: SizedBox(
|
||||
width: size,
|
||||
height: size,
|
||||
child: CircularProgressIndicator(
|
||||
color: Theme.of(context).canvasColor,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
return IconButton(
|
||||
onPressed: () async => await manager.updateTimeline(
|
||||
timeline, TimelineRefreshType.refresh),
|
||||
icon: Icon(
|
||||
Icons.refresh,
|
||||
));
|
||||
}),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).popUntil((route) {
|
||||
|
@ -27,7 +61,7 @@ class UserPostsScreen extends StatelessWidget {
|
|||
),
|
||||
body: Center(
|
||||
child: TimelinePanel(
|
||||
timeline: TimelineIdentifiers.profile(userId),
|
||||
timeline: timeline,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
65
lib/utils/old_android_letsencrypte_cert.dart
Normal file
|
@ -0,0 +1,65 @@
|
|||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:device_info_plus/device_info_plus.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
|
||||
const ISRG_X1 = """
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAw
|
||||
TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh
|
||||
cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4
|
||||
WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJu
|
||||
ZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBY
|
||||
MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54rVygc
|
||||
h77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+
|
||||
0TM8ukj13Xnfs7j/EvEhmk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oJwTdwJx4nLCgdNbOhdjsnvzqvHu7Ur
|
||||
TkXWStAmzOVyyghqpZXjFaH3pO3JLF+l+/+sKAIuvtd7u+Nxe5AW0wdeRlN8NwdC
|
||||
jNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZAJzVc
|
||||
oyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq
|
||||
4RgqsahDYVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPA
|
||||
mRGunUHBcnWEvgJBQl9nJEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57d
|
||||
emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc=
|
||||
-----END CERTIFICATE-----
|
||||
""";
|
||||
final _logger = Logger('OldAndroidLetsEncryptFix');
|
||||
|
||||
Future<void> fixLetsEncryptCertOnOldAndroid() async {
|
||||
if (!Platform.isAndroid) {
|
||||
_logger.info('Not Android, skipping old Android LetsEncrypt cert fix');
|
||||
return;
|
||||
}
|
||||
|
||||
final deviceData = await DeviceInfoPlugin().androidInfo;
|
||||
final sdkVersion = deviceData.version.sdkInt;
|
||||
if (sdkVersion > 24) {
|
||||
_logger.info(
|
||||
'Android version $sdkVersion does not require LetsEncrypt cert fix, skipping');
|
||||
return;
|
||||
}
|
||||
|
||||
_logger.severe(
|
||||
'Android version requires manual initialization of LetsEncrypt ISRG X1 Certificate, attempting now...');
|
||||
try {
|
||||
SecurityContext.defaultContext
|
||||
.setTrustedCertificatesBytes(ascii.encode(ISRG_X1));
|
||||
} catch (e) {
|
||||
_logger.severe('Error initializing ISRG_X1 certificate: $e');
|
||||
}
|
||||
_logger.severe('LetsEncrypt ISRG X1 Certificate fix successfully applied.');
|
||||
}
|
|
@ -6,6 +6,7 @@ import FlutterMacOS
|
|||
import Foundation
|
||||
|
||||
import desktop_window
|
||||
import device_info_plus
|
||||
import flutter_secure_storage_macos
|
||||
import objectbox_flutter_libs
|
||||
import path_provider_foundation
|
||||
|
@ -15,6 +16,7 @@ import url_launcher_macos
|
|||
|
||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
DesktopWindowPlugin.register(with: registry.registrar(forPlugin: "DesktopWindowPlugin"))
|
||||
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
|
||||
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
|
||||
ObjectboxFlutterLibsPlugin.register(with: registry.registrar(forPlugin: "ObjectboxFlutterLibsPlugin"))
|
||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
PODS:
|
||||
- desktop_window (0.0.1):
|
||||
- FlutterMacOS
|
||||
- device_info_plus (0.0.1):
|
||||
- FlutterMacOS
|
||||
- flutter_secure_storage_macos (6.1.1):
|
||||
- FlutterMacOS
|
||||
- FlutterMacOS (1.0.0)
|
||||
|
@ -25,6 +27,7 @@ PODS:
|
|||
|
||||
DEPENDENCIES:
|
||||
- desktop_window (from `Flutter/ephemeral/.symlinks/plugins/desktop_window/macos`)
|
||||
- device_info_plus (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`)
|
||||
- flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`)
|
||||
- FlutterMacOS (from `Flutter/ephemeral`)
|
||||
- objectbox_flutter_libs (from `Flutter/ephemeral/.symlinks/plugins/objectbox_flutter_libs/macos`)
|
||||
|
@ -41,6 +44,8 @@ SPEC REPOS:
|
|||
EXTERNAL SOURCES:
|
||||
desktop_window:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/desktop_window/macos
|
||||
device_info_plus:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos
|
||||
flutter_secure_storage_macos:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos
|
||||
FlutterMacOS:
|
||||
|
@ -58,6 +63,7 @@ EXTERNAL SOURCES:
|
|||
|
||||
SPEC CHECKSUMS:
|
||||
desktop_window: fb7c4f12c1129f947ac482296b6f14059d57a3c3
|
||||
device_info_plus: 5401765fde0b8d062a2f8eb65510fb17e77cf07f
|
||||
flutter_secure_storage_macos: 75c8cadfdba05ca007c0fa4ea0c16e5cf85e521b
|
||||
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
|
||||
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
||||
|
|
16
pubspec.lock
|
@ -249,6 +249,22 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.4.0"
|
||||
device_info_plus:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: device_info_plus
|
||||
sha256: "7ff671ed0a6356fa8f2e1ae7d3558d3fb7b6a41e24455e4f8df75b811fb8e4ab"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.0.0"
|
||||
device_info_plus_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: device_info_plus_platform_interface
|
||||
sha256: d3b01d5868b50ae571cd1dc6e502fc94d956b665756180f7b16ead09e836fd64
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.0.0"
|
||||
email_validator:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
|
@ -43,6 +43,7 @@ dependencies:
|
|||
objectbox_flutter_libs: ^1.7.1
|
||||
path_provider: ^2.0.11
|
||||
carousel_slider: ^4.2.1
|
||||
device_info_plus: ^8.0.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
|