@iternio/react-native-auto-play 0.2.0-alpha.6 → 0.2.0-alpha.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -896,7 +896,7 @@ See [this issue](https://github.com/mrousavy/nitro/issues/382) for details.
896
896
 
897
897
  ## Contributing
898
898
 
899
- Contributions are welcome! Please submit a pull request.
899
+ Contributions are welcome! Feel free to open up a [discussion](https://github.com/Iternio-Planning-AB/react-native-auto-play/discussions) or submit a pull request.
900
900
 
901
901
  ## License
902
902
 
@@ -41,7 +41,7 @@ class AutomotivePermissionRequestTemplate(
41
41
 
42
42
  if (granted) {
43
43
  setResult(PermissionRequestResult(permissions, arrayOf()))
44
- screenManager.pop()
44
+ finish()
45
45
  return
46
46
  }
47
47
 
@@ -85,7 +85,7 @@ class AutomotivePermissionRequestTemplate(
85
85
  granted.toTypedArray(), denied.toTypedArray()
86
86
  )
87
87
  )
88
- screenManager.pop()
88
+ finish()
89
89
  })
90
90
  })
91
91
  cancelButtonText?.let {
@@ -93,7 +93,7 @@ class AutomotivePermissionRequestTemplate(
93
93
  setTitle(it)
94
94
  setOnClickListener(ParkedOnlyOnClickListener.create {
95
95
  setResult(PermissionRequestResult(arrayOf(), permissions))
96
- screenManager.pop()
96
+ finish()
97
97
  })
98
98
  }.build())
99
99
  }
@@ -27,7 +27,7 @@ export class Template {
27
27
  return HybridAutoPlay.popToTemplate(this.id);
28
28
  }
29
29
  setHeaderActions(headerActions) {
30
- const nitroActions = NitroActionUtil.convert(headerActions);
30
+ const nitroActions = NitroActionUtil.convert(this, headerActions);
31
31
  return HybridAutoPlay.setTemplateHeaderActions(this.id, nitroActions);
32
32
  }
33
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iternio/react-native-auto-play",
3
- "version": "0.2.0-alpha.6",
3
+ "version": "0.2.0-alpha.8",
4
4
  "description": "Android Auto and Apple CarPlay for react-native",
5
5
  "main": "lib/index",
6
6
  "module": "lib/index",
@@ -103,7 +103,10 @@ export class Template<TemplateConfigType, ActionsType> {
103
103
  }
104
104
 
105
105
  public setHeaderActions<T>(headerActions?: ActionsType) {
106
- const nitroActions = NitroActionUtil.convert(headerActions as HeaderActions<T>);
106
+ const nitroActions = NitroActionUtil.convert(
107
+ this as unknown as T,
108
+ headerActions as HeaderActions<T>
109
+ );
107
110
  return HybridAutoPlay.setTemplateHeaderActions(this.id, nitroActions);
108
111
  }
109
112
  }