GroupBaseActivity: Re-enable refresh of list after changes/sorting
Fixed issues in QuickUnlock
This commit is contained in:
		| @@ -180,6 +180,8 @@ namespace keepass2android | ||||
| 		//TODO protected GroupView GroupView; | ||||
|  | ||||
| 		private String strCachedGroupUuid = null; | ||||
| 	     | ||||
|  | ||||
| 	    public String UuidGroup { | ||||
| 			get { | ||||
| 				if (strCachedGroupUuid == null) { | ||||
| @@ -210,12 +212,16 @@ namespace keepass2android | ||||
| 			Database db = App.Kp2a.GetDb(); | ||||
| 			if ( db.Dirty.Contains(Group) ) { | ||||
| 				db.Dirty.Remove(Group); | ||||
| 				/*TODO BaseAdapter adapter = (BaseAdapter) ListAdapter; | ||||
| 				adapter.NotifyDataSetChanged();*/ | ||||
| 				ListAdapter.NotifyDataSetChanged(); | ||||
| 				 | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 	    public BaseAdapter ListAdapter | ||||
| 	    { | ||||
|             get { return (BaseAdapter) FragmentManager.FindFragmentById<GroupListFragment>(Resource.Id.list_fragment).ListAdapter; } | ||||
| 	    } | ||||
|  | ||||
| 	    /*TODO  | ||||
|          * protected override void OnListItemClick(ListView l, View v, int position, long id) { | ||||
| 			base.OnListItemClick(l, v, position, id); | ||||
| @@ -494,11 +500,10 @@ namespace keepass2android | ||||
| 				if (!String.IsNullOrEmpty(message)) | ||||
| 					Toast.MakeText(this, message, ToastLength.Long).Show(); | ||||
|  | ||||
|                 /*TODO | ||||
|                 // Tell the adapter to refresh it's list | ||||
| 				BaseAdapter adapter = (BaseAdapter)ListAdapter; | ||||
| 				adapter.NotifyDataSetChanged(); | ||||
|                 */ | ||||
|                  | ||||
|                 if (App.Kp2a.GetDb().OtpAuxFileIoc != null) | ||||
| 				{ | ||||
| 					var task2 = new SyncOtpAuxFile(App.Kp2a.GetDb().OtpAuxFileIoc); | ||||
| @@ -556,10 +561,10 @@ namespace keepass2android | ||||
| 						db.Dirty.Remove(Group); | ||||
|  | ||||
| 						// Tell the adapter to refresh it's list | ||||
|                         /*TODO | ||||
|                          | ||||
| 						BaseAdapter adapter = (BaseAdapter)ListAdapter; | ||||
| 						adapter.NotifyDataSetChanged(); | ||||
| 			*/ | ||||
| 			 | ||||
| 			 | ||||
| 					}) | ||||
| 					.SetPositiveButton(Android.Resource.String.Ok, (sender, args) => ((Dialog)sender).Dismiss()) | ||||
| @@ -628,9 +633,9 @@ namespace keepass2android | ||||
| 		{ | ||||
|              | ||||
| 			ShowInsertElementButtons(); | ||||
|             /*TODOGroupView.ListView.InvalidateViews(); | ||||
|             //TODO Required? GroupView.ListView.InvalidateViews(); | ||||
|             BaseAdapter adapter = (BaseAdapter)ListAdapter; | ||||
|             adapter.NotifyDataSetChanged();*/ | ||||
|             adapter.NotifyDataSetChanged(); | ||||
| 		} | ||||
|  | ||||
| 		public void ShowInsertElementButtons() | ||||
| @@ -661,9 +666,9 @@ namespace keepass2android | ||||
| 			 | ||||
| 			AppTask = new NullTask(); | ||||
| 			AppTask.SetupGroupBaseActivityButtons(this); | ||||
| 			/*TODO GroupView.ListView.InvalidateViews(); | ||||
| 			//TODO Required? GroupView.ListView.InvalidateViews(); | ||||
| 			BaseAdapter adapter = (BaseAdapter)ListAdapter; | ||||
| 			adapter.NotifyDataSetChanged();*/ | ||||
| 			adapter.NotifyDataSetChanged(); | ||||
| 		} | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -104,6 +104,11 @@ namespace keepass2android | ||||
| 					OnUnlock(quickUnlockLength, pwd); | ||||
| 				}; | ||||
|  | ||||
| 		    FindViewById(Resource.Id.unlock_img_button).Click += (sender, args) => | ||||
| 		    { | ||||
|                 OnUnlock(quickUnlockLength, pwd); | ||||
| 		    }; | ||||
|  | ||||
| 			Button btnLock = (Button) FindViewById(Resource.Id.QuickUnlock_buttonLock); | ||||
| 			btnLock.Click += (object sender, EventArgs e) => | ||||
| 				{ | ||||
|   | ||||
| @@ -139,6 +139,8 @@ android:paddingRight="16dp" | ||||
|               android:layout_width="wrap_content" | ||||
|               android:layout_height="wrap_content" | ||||
|               android:layout_marginLeft="16dp" | ||||
|               android:layout_marginBottom="8dp" | ||||
|               android:layout_gravity="bottom" | ||||
|               android:src="@drawable/ic_unlock" | ||||
|               android:background="?android:selectableItemBackground" /> | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Philipp Crocoll
					Philipp Crocoll