Skip to content

Commit

Permalink
fix: run on linux, go_to_line
Browse files Browse the repository at this point in the history
  • Loading branch information
brvier committed Nov 5, 2023
1 parent 24f1dbe commit 8207b92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion buildozer.spec
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ android.accept_sdk_license = True
p4a.fork = kivy
# (str) python-for-android branch to use, defaults to master
p4a.branch = develop
p4a.branch =
# (str) python-for-android specific commit to use, defaults to HEAD, must be within p4a.branch
#p4a.commit = HEAD
Expand Down
12 changes: 8 additions & 4 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@
from models import Item, Note, Journal, Event, Todo
from ux import get_android_vkeyboard_height
from kivy.factory import Factory
from share_listener import ShareListener

import pytodotxt

if platform == "android":
from share_listener import ShareListener

kivy.require("2.0.0")
Window.softinput_mode = ""
EVENT_RE = re.compile(
Expand Down Expand Up @@ -346,7 +348,7 @@ def load_todos(self):
t = Todo(
task.description,
path=os.path.join(orgpath(), "todo.txt"),
lineno=task.linenr + 1,
lineno=task.linenr,
priority=task.priority,
)
if (t.priority is None) or (t.priority == "A"):
Expand Down Expand Up @@ -475,7 +477,8 @@ def do_add(self, *kwargs):
open(
os.path.join(
orgpath(),
"quicknote.txt",
"notes",
"quicknote.md",
),
"a",
)
Expand Down Expand Up @@ -765,7 +768,8 @@ def on_current_date(self, s, d, **kw):
self._load_current_notes_items()

def on_start(self):
self.share_listener = ShareListener(text_callback=self.shareintent_text)
if platform == 'android':
self.share_listener = ShareListener(text_callback=self.shareintent_text)

def on_stop(self):
pass
Expand Down

0 comments on commit 8207b92

Please sign in to comment.