mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
add note option at time of highlight
This commit is contained in:
parent
a0e42986b4
commit
17edcc436a
3 changed files with 10 additions and 3 deletions
|
|
@ -32,6 +32,7 @@ object AppModule {
|
|||
): Analytics {
|
||||
val writeKey = app.getString(R.string.segment_write_key)
|
||||
|
||||
// TODO: abstract analytics to custom class
|
||||
return Analytics(writeKey, app.applicationContext) {
|
||||
trackApplicationLifecycleEvents = true
|
||||
application = app.applicationContext
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ class OmnivoreWebView(context: Context) : WebView(context) {
|
|||
// Called when the user selects a contextual menu item
|
||||
override fun onActionItemClicked(mode: ActionMode, item: MenuItem): Boolean {
|
||||
return when (item.itemId) {
|
||||
R.id.annotateHighlight -> {
|
||||
R.id.annotateHighlight, R.id.annotate -> {
|
||||
val script = "var event = new Event('annotate');document.dispatchEvent(event);"
|
||||
evaluateJavascript(script) {
|
||||
mode.finish()
|
||||
|
|
|
|||
|
|
@ -1,6 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/copyPdfHighlight"
|
||||
android:title="@string/pdf_highlight_copy"
|
||||
app:showAsAction="always">
|
||||
</item>
|
||||
|
||||
<item
|
||||
android:id="@+id/createHighlight"
|
||||
android:title="@string/pdf_highlight_menu_action"
|
||||
|
|
@ -8,8 +14,8 @@
|
|||
</item>
|
||||
|
||||
<item
|
||||
android:id="@+id/copyPdfHighlight"
|
||||
android:title="@string/pdf_highlight_copy"
|
||||
android:id="@+id/annotate"
|
||||
android:title="@string/pdf_highlight_menu_note"
|
||||
app:showAsAction="always">
|
||||
</item>
|
||||
</menu>
|
||||
|
|
|
|||
Loading…
Reference in a new issue