浏览代码

Merge pull request #569 from ente-io/add_pragma_hint

Add pragma hint & bump version
Manav 2 年之前
父节点
当前提交
fc4b2d1de4
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 2 0
      lib/main.dart
  2. 1 1
      pubspec.yaml

+ 2 - 0
lib/main.dart

@@ -109,6 +109,8 @@ Future<void> _runInBackground(String taskId) async {
   BackgroundFetch.finish(taskId);
 }
 
+// https://stackoverflow.com/a/73796478/546896
+@pragma('vm:entry-point')
 void _headlessTaskHandler(HeadlessTask task) {
   if (task.timeout) {
     BackgroundFetch.finish(task.taskId);

+ 1 - 1
pubspec.yaml

@@ -12,7 +12,7 @@ description: ente photos application
 # Read more about iOS versioning at
 # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
 
-version: 0.6.42+372
+version: 0.6.43+373
 
 environment:
   sdk: '>=2.17.0 <3.0.0'