Exemplo n.º 1
0
 public bool AddAyahBookmark(QuranAyah ayah)
 {
     try
     {
         using (var adapter = new BookmarksDatabaseHandler())
         {
             if (ayah == null)
             {
                 adapter.AddBookmarkIfNotExists(null, null, CurrentPageNumber);
             }
             else
             {
                 adapter.AddBookmarkIfNotExists(ayah.Surah, ayah.Ayah, CurrentPageNumber);
             }
         }
         CurrentPageBookmarked = BookmarksDatabaseHandler.IsPageBookmarked(CurrentPageNumber);
         return(true);
     }
     catch (Exception e)
     {
         QuranApp.NativeProvider.Log("error creating bookmark");
         telemetry.TrackException(e, new Dictionary <string, string> {
             { "Scenario", "AddBookmark" }
         });
         return(false);
     }
 }