Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into atavism/plausible
Browse files Browse the repository at this point in the history
  • Loading branch information
atavism committed Oct 23, 2023
2 parents 21c7e5b + f4c4791 commit 8cbed26
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 46 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Publish releases

on: push
on:
workflow_dispatch:

permissions:
contents: read
Expand Down
10 changes: 1 addition & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,7 @@ require-sentry:
@if [[ -z "$(SENTRY)" ]]; then echo 'Missing "sentry-cli" command. See sentry.io for installation instructions.'; exit 1; fi

release-autoupdate: require-version
@TAG_COMMIT=$$(git rev-list --abbrev-commit -1 $(TAG)) && \
if [[ -z "$$TAG_COMMIT" ]]; then \
echo "Could not find given tag $(TAG)."; \
fi && \
for URL in s3://lantern/lantern_update_android_arm-$$VERSION.bz2; do \
NAME=$$(basename $$URL) && \
STRIPPED_NAME=$$(echo "$$NAME" | cut -d - -f 1 | sed s/lantern_//).bz2 && \
s3cmd get --force s3://$(S3_BUCKET)/$$NAME $$STRIPPED_NAME; \
done && \
@curl https://s3.amazonaws.com/lantern/lantern-installer.apk | bzip2 > update_android_arm.bz2 && \
$(RUBY) ./create_or_update_release.rb getlantern lantern $$VERSION update_android_arm.bz2

release: require-version require-s3cmd require-wget require-lantern-binaries require-release-track release-prod copy-beta-installers-to-mirrors invalidate-getlantern-dot-org upload-aab-to-play
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ To publish a release on Google Play, go to the Lantern App on the [Google Play C

### Enabling Auto-Update for a Sideloaded Release

Just because something's been released to prod doesn't mean clients will auto-update, there's an additional step for that.
Just because something's been released to prod doesn't mean clients will auto-update, there's an additional step for that. The below will release the current production version to autoupdate. Please make sure the VERSION parameter matches the current production version.

```
GH_TOKEN=<token> VERSION=7.2.0 make release-autoupdate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.getlantern.lantern

import android.annotation.SuppressLint
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.content.pm.PackageManager
Expand All @@ -12,6 +14,7 @@ import android.widget.TextView
import androidx.annotation.NonNull
import androidx.appcompat.app.AlertDialog
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.embedding.engine.FlutterEngineCache
Expand Down Expand Up @@ -154,11 +157,16 @@ class MainActivity :
}
}

@SuppressLint("WrongConstant")
override fun onStart() {
super.onStart()
val packageName = activity.packageName
IntentFilter("$packageName.intent.VPN_DISCONNECTED").also {
registerReceiver(receiver, it)
ContextCompat.registerReceiver(
this@MainActivity,
receiver,
it,
ContextCompat.RECEIVER_NOT_EXPORTED)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,17 +196,20 @@ open class FreeKassaActivity : BaseFragmentActivity() {
}
}
}

val plan = LanternApp.getSession().planByID(planID!!)!!
val currency = plan.currency
val u = FreeKassa.getPayURI(
merchantId,
price!!,
LanternApp.getSession().currency(),
currency,
planID!!,
secretWordOne,
LanternApp.getSession().language,
userEmail!!,
mapOf(
"transactionid" to transactionID,
"paymentcurrency" to LanternApp.getSession().currency()
"paymentcurrency" to currency
)
)
Logger.d(TAG, "freeKassa Payment URI: $u")
Expand Down
52 changes: 29 additions & 23 deletions lib/account/privacy_disclosure.dart
Original file line number Diff line number Diff line change
@@ -1,38 +1,44 @@
import 'package:lantern/common/common.dart';

class PrivacyDisclosure extends StatelessWidget {
const PrivacyDisclosure({super.key});

@override
Widget build(BuildContext context) {
return FullScreenDialog(
widget: Padding(
padding: EdgeInsetsDirectional.only(
start: 33, end: 33),
padding: const EdgeInsetsDirectional.only(start: 33, end: 33),
child: SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
margin: const EdgeInsetsDirectional.only(top: 38),
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
margin: const EdgeInsetsDirectional.only(top: 38),
child: CText(
'privacy_disclosure_title'.i18n,
style: tsSubtitle1.copiedWith(fontSize: 24.0),
)),
Padding(
padding: EdgeInsetsDirectional.only(top: 24, bottom: 24),
child: CText(
'privacy_disclosure_body'.i18n,
style: tsBody2.copiedWith(fontSize: 14.0, lineHeight: 24.0),
),
),
const Spacer(),
Container(
margin: const EdgeInsetsDirectional.only(bottom: 38),
child: Button(
width: 200,
text: 'privacy_disclosure_accept'.i18n,
onPressed: () async => await sessionModel.acceptTerms(),
)),
])),
),
Padding(
padding: const EdgeInsetsDirectional.only(top: 24, bottom: 24),
child: CText(
'privacy_disclosure_body'.i18n,
style: tsBody2.copiedWith(fontSize: 14.0, lineHeight: 24.0),
),
),
Container(
margin: const EdgeInsetsDirectional.only(bottom: 38),
child: Button(
width: 200,
text: 'privacy_disclosure_accept'.i18n,
onPressed: () async => await sessionModel.acceptTerms(),
),
),
],
),
),
),
);
}
}
1 change: 0 additions & 1 deletion lib/account/split_tunneling.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class _SplitTunnelingState extends State<SplitTunneling> {

void init() async {
unawaited(sessionModel.refreshAppsList());
await sessionModel.trackUserAction('Split tunneling screen shown to user');
var _vpnConnected = await vpnModel.isVpnConnected();
setState(() {
vpnConnected = _vpnConnected;
Expand Down
8 changes: 0 additions & 8 deletions lib/common/session_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,6 @@ class SessionModel extends Model {
);
}

Future<void> trackUserAction(
String message,
) async {
return methodChannel.invokeMethod('trackUserAction', <String, dynamic>{
'message': message,
});
}

Future<void> redeemResellerCode(
String email,
String resellerCode,
Expand Down

0 comments on commit 8cbed26

Please sign in to comment.