Skip to content

Commit

Permalink
Merge pull request #218 from humhub/f-update-podfile
Browse files Browse the repository at this point in the history
Update podfile
  • Loading branch information
luke- committed Aug 26, 2024
2 parents 19d07e1 + 473e349 commit 7ee0066
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 35 deletions.
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,6 @@ SPEC CHECKSUMS:
uni_links: d97da20c7701486ba192624d99bffaaffcfc298a
url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de

PODFILE CHECKSUM: 856c07a4fed045b0a351a5a1c295bc5159222ac7
PODFILE CHECKSUM: 72745f028dd7c562fb767fd9cb1eb339265e62f6

COCOAPODS: 1.15.2
32 changes: 14 additions & 18 deletions lib/flavored/web_view.f.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,9 @@ class FlavoredWebViewState extends ConsumerState<WebViewF> {
color: HexColor(instance.manifest.themeColor),
),
onRefresh: () async {
if (Platform.isAndroid) {
WebViewGlobalController.value?.reload();
} else if (Platform.isIOS) {
WebViewGlobalController.value
?.loadUrl(urlRequest: URLRequest(url: await WebViewGlobalController.value?.getUrl()));
}
WebViewGlobalController.value?.loadUrl(
urlRequest: URLRequest(url: await WebViewGlobalController.value?.getUrl(), headers: _initialRequest.headers),
);
},
);
}
Expand Down Expand Up @@ -102,15 +99,15 @@ class FlavoredWebViewState extends ConsumerState<WebViewF> {
}

InAppWebViewSettings get _settings => InAppWebViewSettings(
useShouldOverrideUrlLoading: true,
useShouldInterceptFetchRequest: true,
javaScriptEnabled: true,
supportZoom: false,
javaScriptCanOpenWindowsAutomatically: true,
supportMultipleWindows: true,
useHybridComposition: true,
allowsInlineMediaPlayback: true,
);
useShouldOverrideUrlLoading: true,
useShouldInterceptFetchRequest: true,
javaScriptEnabled: true,
supportZoom: false,
javaScriptCanOpenWindowsAutomatically: true,
supportMultipleWindows: true,
useHybridComposition: true,
allowsInlineMediaPlayback: true,
);

Future<NavigationActionPolicy?> _shouldOverrideUrlLoading(
InAppWebViewController controller, NavigationAction action) async {
Expand Down Expand Up @@ -173,7 +170,7 @@ class FlavoredWebViewState extends ConsumerState<WebViewF> {
.evaluateJavascript(source: "document.querySelector('#login-rememberme').checked=true");
WebViewGlobalController.value!.evaluateJavascript(
source:
"document.querySelector('#account-login-form > div.form-group.field-login-rememberme').style.display='none';");
"document.querySelector('#account-login-form > div.form-group.field-login-rememberme').style.display='none';");
}
_setAjaxHeadersJQuery(controller);
LoadingProvider.of(ref).dismissAll();
Expand All @@ -183,8 +180,7 @@ class FlavoredWebViewState extends ConsumerState<WebViewF> {
_setAjaxHeadersJQuery(controller);
}

void _onLoadError(InAppWebViewController controller, WebResourceRequest request,
WebResourceError error) async {
void _onLoadError(InAppWebViewController controller, WebResourceRequest request, WebResourceError error) async {
if (error.description == 'net::ERR_INTERNET_DISCONNECTED') ShowDialog.of(context).noInternetPopup();
pullToRefreshController.endRefreshing();
}
Expand Down
37 changes: 22 additions & 15 deletions lib/pages/opener.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ class OpenerState extends ConsumerState<Opener> with SingleTickerProviderStateMi
final FormHelper helper = FormHelper();
// Fade out Logo and opener when redirecting
bool _visible = true;
bool _textFieldAddInfoVisibility = false;
bool _textFieldVisibility = false;
bool _languageSwitcherVisibility = false;

@override
void initState() {
Expand All @@ -45,9 +46,15 @@ class OpenerState extends ConsumerState<Opener> with SingleTickerProviderStateMi
_controllerReverse = _animationReverse;

WidgetsBinding.instance.addPostFrameCallback((_) async {
Future.delayed(const Duration(milliseconds: 900), () {
setState(() {
_textFieldVisibility = true;
});
});

Future.delayed(const Duration(milliseconds: 700), () {
setState(() {
_textFieldAddInfoVisibility = true;
_languageSwitcherVisibility = true;
});
});

Expand Down Expand Up @@ -89,7 +96,7 @@ class OpenerState extends ConsumerState<Opener> with SingleTickerProviderStateMi
mainAxisSize: MainAxisSize.min,
children: <Widget>[
AnimatedOpacity(
opacity: _visible ? 1.0 : 0.0,
opacity: _languageSwitcherVisibility ? 1.0 : 0.0,
duration: const Duration(milliseconds: 300),
child: const Padding(
padding: EdgeInsets.only(top: 10, right: 16),
Expand All @@ -104,21 +111,17 @@ class OpenerState extends ConsumerState<Opener> with SingleTickerProviderStateMi
),
Expanded(
flex: 8,
child: AnimatedOpacity(
opacity: _visible ? 1.0 : 0.0,
duration: const Duration(milliseconds: 300),
child: SizedBox(
height: 100,
width: 230,
child: Image.asset(Assets.logo),
),
child: SizedBox(
height: 100,
width: 230,
child: Image.asset(Assets.logo),
),
),
Expanded(
flex: 12,
child: AnimatedOpacity(
opacity: _textFieldAddInfoVisibility ? 1.0 : 0.0,
duration: const Duration(milliseconds: 500),
opacity: _textFieldVisibility ? 1.0 : 0.0,
duration: const Duration(milliseconds: 250),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 35),
child: Column(
Expand Down Expand Up @@ -206,10 +209,12 @@ class OpenerState extends ConsumerState<Opener> with SingleTickerProviderStateMi
flex: 4,
child: GestureDetector(
onTap: () {
FocusManager.instance.primaryFocus?.unfocus();
_controller.isActive = true;
setState(() {
_visible = false;
_textFieldAddInfoVisibility = false;
_textFieldVisibility = false;
_languageSwitcherVisibility = false;
});
Future.delayed(const Duration(milliseconds: 700)).then((value) {
Navigator.push(
Expand All @@ -232,7 +237,8 @@ class OpenerState extends ConsumerState<Opener> with SingleTickerProviderStateMi
_visible = true;
Future.delayed(const Duration(milliseconds: 700), () {
setState(() {
_textFieldAddInfoVisibility = true;
_textFieldVisibility = true;
_languageSwitcherVisibility = true;
});
});
_controllerReverse.isActive = true;
Expand Down Expand Up @@ -268,6 +274,7 @@ class OpenerState extends ConsumerState<Opener> with SingleTickerProviderStateMi
}

_connectInstance() async {
FocusManager.instance.primaryFocus?.unfocus();
await controlLer.initHumHub();
if (controlLer.allOk) {
ref.read(humHubProvider).getInstance().then((value) {
Expand Down
4 changes: 3 additions & 1 deletion lib/pages/web_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ class WebViewAppState extends ConsumerState<WebView> {
color: HexColor(manifest.themeColor),
),
onRefresh: () async {
WebViewGlobalController.value?.reload();
WebViewGlobalController.value?.loadUrl(
urlRequest: URLRequest(url: await WebViewGlobalController.value?.getUrl(), headers: _initialRequest.headers),
);
},
);
authBrowser = AuthInAppBrowser(
Expand Down

0 comments on commit 7ee0066

Please sign in to comment.