Himalayan-Academy / Siva-Siva-App

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

Nightly SivaSiva 1.7 (17) TestFlight: It Does Not Work for Read as Books for the Journal #314

Open Brahmanathaswami opened 3 years ago

Brahmanathaswami commented 3 years ago

This is what i have in SivaSiva 1.7 (17) TestFlght

on journal_AddEntry

   local pData, tTitle, tOutput, 
   local tParseURL, tLastItemInURL, tWords

   -- this is a hack  until we figure out the regEx for matchText 
   --for the <title class="whatever"....> in find in Gatsby and other pages
   --we get the title from the original mouseup of the portal screen

   if sBrowserURL contains "YouTube" then
      # the journal label is taken from the JSON of out navigation dictionary
      # which are appears on this sub nav list.
      # for now, this implemention of Video is contrain to that list
      # leave it for now
      put portal_GetLabel() into tTitle
   else

      # if URL ends with "/web/" it is a "book"
      # otherwise we have to parse the URL to get tTitle

      put browser_GetLastURL() into pData["url"] 
      put  pData["url"] into tParseURL

      set the  itemdelimiter to "/"
      put item -1 of tParseURL into tLastItemInURL 

      if tParseURL contains "/web/" then
         # book
         put getJournalData() into tTitle

         # we get the title plus the url for "chapter"
         #  for "chapter" in the book

         if tLastItemInURL <> "" then 
            put tTitle &", " &  tLastItemInURL into tTitle
         end if

      else
         put "" into tTitle

         replace "-"  with " " in tLastItemInURL 
         replace "_" with " " in tLastItemInURL 

         put the number of words of tLastItemInURL into tWords

         repeat with x  = 1 to tWords
            put toUpper(char 1 of word  x of tLastItemInURL) into tWords
            delete char 1 of word  x of tLastItemInURL
            put tWords &  word  x of tLastItemInURL into  tWords
            put tWords & " " after tTitle 
         end repeat
         delete char -1 of tTitle
      end if

   end if

   if sLandscapeOnly then
      Journal_RecordEntry "view_BrowserLandscape",tTitle,pData  
   else
      Journal_RecordEntry "view_SivaSivaBrowser",tTitle,pData   
   end if

   dialog_CustomMsg "Saved to Journal"
end journal_AddEntry

This picks up Topics, going forward to you reach a place where you can listen or view a video.

Android: SivaSiva 1.7 (17)

IMG_2286

https://user-images.githubusercontent.com/3675722/126174919-75ee4087-7499-4351-94ca-0dc196a5c9a9.MOV

iPhone IMG_2289 IMG_2290

soapdog commented 3 years ago

Swami,

You need to work a bit more on these issue descriptions. It is not good enough. Please don't go pasting source code like this. You need to write things in terms of what is the expected behaviour and what is going wrong and *a recipe to reproduce the error**. Right now, you pasted source code, a collection of screenshots, but there is no clear message of what is wrong or a recipe to reproduce it.

From seeing this, it is not clear to me what you are talking about. I don't even know how you get to that topics page, I have never seen it.

Bug reports need to be well thought out. You often simply paste source code, that is not useful. Saying Does not Work is also not useful because you're not saying what doesn't work and how it is not working as expected.

I want to work on this issue but without a better description, I don't even know what to work on.

soapdog commented 3 years ago

I edited your original issue to add the source code markers to make it easier to read. The comment I wrote above, still applies.

soapdog commented 3 years ago

After checking the source code, and running it a couple times. I believe this issue is about the journal entry being recorded with just the title of the book versus having it with title and some hint about which chapter.

I will work on it.

Brahmanathaswami commented 3 years ago

It will work: Desktop AND Android, BUT it is Simulator where it won't work. And, TestFlight, open to SivaSiva, ALSO does not work, so this proves Simulator backs up (in one case) a TestFlight opening on iPhone.