Himalayan-Academy / Siva-Siva-App

Code Repository for the Siva Siva Mobile App
11 stars 3 forks source link

Journal: Bug on Android #184

Closed Brahmanathaswami closed 6 years ago

Brahmanathaswami commented 6 years ago

We might consider redoing the journal differently...

Brahmanathaswami commented 6 years ago

I would like to try datagrid eventually. It really cool. current doesn't scroll well but they have to fix it

soapdog commented 6 years ago

I've been working on a complete new journal stack. It is already working a lot better! It is still a work in progress but it renders fast and it renders correctly regardless of the screen rect.

ezgif com-video-to-gif

Be aware that the conversion of a video to GIF, which is what I used to make the animation above reduces the frame rate, it is much better in the real stack.

Testing the new stack is a bit tricky at the moment because I had to patch the Siva-Siva-App.json and the navigation button that leads to the Journal. This will not be needed for the final version, it is because I want to have both Journals available here so that I can compare stuff before replacing one with the other.

Also it is important to notice that the new journal stack is a binary stack with its source in it, I will only move to a behavior script once it is fully working. So please, don't edit it because I will not be able to merge it back.

soapdog commented 6 years ago

The black bar in the animation above is because the android recorder doesn't capture its own android navigation bar. Notice how the journal layouts correctly while the portal uses letterboxes

soapdog commented 6 years ago

Filtering and setting favorites works:

ezgif com-video-to-gif 1

Preparing for replacing one journal with the other.

soapdog commented 6 years ago

Tested the new nightly on Android. There are some instabilities but it is already working better than the new Journal.

Brahmanathaswami commented 6 years ago

Closed for now

Brahmanathaswami commented 6 years ago

ln gem if had set the journal entry to the database, in the json tDataA, the path of the image and the quote numbers. These are saved, but click in the journal is not resuming to the same quote.

dispatch "journalresume" to stack tEntryA["module"] with tDataA, tEntryAgit

I have uploaded a version that works see branch "small-1-2-3-fixes" and compare to "nightly" 2018-10-07_08-42-49

Brahmanathaswami commented 6 years ago

@soapdog this is for you

soapdog commented 6 years ago

begun merging branch small-1-2-3-fixes into nightly.

soapdog commented 6 years ago

merged.

soapdog commented 6 years ago

the code merged doesn't work as expected. The bugs are in gems and listen, they are not handling the journalresume handler correctly.

Brahmanathaswami commented 6 years ago

The Quote is saved now with the url to the picture.

one problem in it quote have unicode diacritical marks:

"The pujārī performs strict ablutions..." etc

comes in 2018-10-12_09-43-22 the journal as raw text.

The pujārī performs strict ablution... you will need use

textEncode(stringToEncode, encoding)

and

textDecode(binaryData, encoding)

or something else to maintain the unicode the pDataA [json string}

Brahmanathaswami commented 6 years ago
  1. Go to PathToSiva on desktop
  2. go to lesson one
  3. Click back to the Portals
  4. click on the journal --Results: take you back to the lesson.

try this same thing an Android

  1. Go to PathToSiva on desktop
  2. go to lesson one
  3. Click back to the Portals
  4. click on the journal It goes cover card and stops there. The app hungs

this code is reacting different on Andriod (I have yet to test on iOS)

` on journalResume pData,pEntryA -- sent from journal stack close stack "journal" put pData["card"] into tCd goCd tCd if tCd begins with "lesson" then put pData["lessonNum"] into tNum send "loadLesson tNum" to this cd end if end journalResume

command goCd pCdName,pEffect -- optional effect param if the short name of this cd = pCdName then exit goCd if pEffect = "" then put "plain" into pEffect put (pCdName begins with "lesson") into tIslesson lock screen for visual effect if there is a cd pCdName then go cd pCdName else if tIslesson then go cd "lessonView" send "loadLesson (word 2 of pCdName)" to this cd else if pCdName = "home" then -- return to project put "push right" into pEffect send "portal_Link read" to me in 0 exit goCd end if toggleHeader not tIslesson and (the number of cd pCdName > 2) unlock screen with visual effect pEffect fast end goCd `

Brahmanathaswami commented 6 years ago

On iOS we see is happening with Path to Siva.

  1. we launch activity
  2. it to stack, opening cd 1 very quickly; but into message queue we how have a pending send "gotoPathIndex" to me in 4 second (issue on card 1)
  3. next it got right away to the card we want..
  4. but, after 4 second passes, it goes to the index card.

in iOS it doesn't have

on Android, 1 ) opens that stack to the cover card 2) 'hangs" on something.

Brahmanathaswami commented 6 years ago

You need to set the orientation of journal go portrait

1) go to LOOK 2) hit the History movie 3) then click the journal 4) The journal tries to render in landscape orientation.

Brahmanathaswami commented 6 years ago

I solved the issue of going back to same quote, it does not "hang" but keep going to the same quote and picture everytime because sJournalData has data in it! after your render card, set it to empty, and every works. You have to do this order, so all instances of calling a quote should be

fetchQuote fetchImage / you do the other way, you won't same image. you get the quote, but next image will be random because sJournalData in empty.

` [snip} set the filename of img "gems-image" to sivasiva_AssetFolder() & tNextImagePath
setLastImagePath tNextImagePath
show image "gems-Image"

put empty into sJournalData / other wise you get the same quote over and over again!`

Brahmanathaswami commented 6 years ago

Is this function being used? If not, can I delete it? it confusing

Line 254 of model_SivaSivaJournal'

on journalresume pDataA, pEntryA put "Error: no one could handle journalresume, going for the default behavior" --put "Launching" && pEntryA["module"] portal_GoStack pEntryA["module"] end journalresume

soapdog commented 6 years ago

@Brahmanathaswami if you delete this function the whole app will break. This function is there so that it traps the journalresume message in case it is not handled by other modules. Basically, if you try to resume something from the journal by clicking on an entry but the module never implemented journalresume then it will end up there.

So, don't delete it, it is there to safeguard against bad messages flying around.

Brahmanathaswami commented 6 years ago

OK...close this for now. And open a new thread if another bugs comes alonsg