|
@@ -18,6 +18,7 @@ import androidx.appcompat.app.AppCompatActivity;
|
|
|
import androidx.fragment.app.Fragment;
|
|
import androidx.fragment.app.Fragment;
|
|
|
|
|
|
|
|
import com.usai.ratradefiling.R;
|
|
import com.usai.ratradefiling.R;
|
|
|
|
|
+import com.usai.ratradefiling.dataprovider.RADataProvider;
|
|
|
|
|
|
|
|
//import com.usai.apex.ApexTrackingApplication;
|
|
//import com.usai.apex.ApexTrackingApplication;
|
|
|
//import com.usai.apex.R;
|
|
//import com.usai.apex.R;
|
|
@@ -49,43 +50,40 @@ public class CheckSavedActivity extends AppCompatActivity {
|
|
|
public void onClick(DialogInterface dialog,
|
|
public void onClick(DialogInterface dialog,
|
|
|
int which)
|
|
int which)
|
|
|
{
|
|
{
|
|
|
-// SQLiteDatabase db = dbUtil.OpenDB(
|
|
|
|
|
-// CheckSavedActivity.this, null, false);
|
|
|
|
|
-// String function_name = getIntent().getStringExtra("function_name");
|
|
|
|
|
-// if(function_name.equals("Saved Detail"))
|
|
|
|
|
-// {
|
|
|
|
|
-//
|
|
|
|
|
-// db.execSQL(String.format("delete from favorites where user = '%s'", ApexTrackingApplication.get_user()));
|
|
|
|
|
-//// getSupportFragmentManager().get
|
|
|
|
|
-//// SavedSearchFragment f = (SavedSearchFragment)getSupportFragmentManager().findFragmentById(R.id.tab1);
|
|
|
|
|
-// SavedDetailFragment detail =(SavedDetailFragment) f;
|
|
|
|
|
-// detail.clear_result();
|
|
|
|
|
-// detail.reload_adapter();
|
|
|
|
|
-// }
|
|
|
|
|
-// else if(function_name.equals("Saved Search"))
|
|
|
|
|
|
|
+
|
|
|
|
|
+ String function_name = getIntent().getStringExtra("function_name");
|
|
|
|
|
+ if(function_name.equals("Saved Log"))
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+ RADataProvider.clearSavedList("saved_detail");
|
|
|
|
|
+ SavedDetailFragment detail =(SavedDetailFragment) f;
|
|
|
|
|
+
|
|
|
|
|
+ detail.clear_result();
|
|
|
|
|
+ detail.reload_adapter();
|
|
|
|
|
+ }
|
|
|
|
|
+ else if(function_name.equals("Saved Search"))
|
|
|
|
|
+ {
|
|
|
|
|
+ RADataProvider.clearSavedList("saved_search");
|
|
|
|
|
+
|
|
|
|
|
+ SavedSearchFragment search =(SavedSearchFragment) f;
|
|
|
|
|
+ search.clear_result();
|
|
|
|
|
+ search.reload_adapter();
|
|
|
|
|
+ }
|
|
|
|
|
+// else if(function_name.equals("Saved Documents"))
|
|
|
// {
|
|
// {
|
|
|
-// db.execSQL(String.format("delete from history where user = '%s'",ApexTrackingApplication.get_user()));
|
|
|
|
|
-//// SavedDetailFragment f = (SavedDetailFragment)getSupportFragmentManager().findFragmentById(R.id.tab2);
|
|
|
|
|
-//
|
|
|
|
|
-// SavedSearchFragment search =(SavedSearchFragment) f;
|
|
|
|
|
-// search.clear_result();
|
|
|
|
|
-// search.reload_adapter();
|
|
|
|
|
|
|
+//// db.execSQL("delete from favorites");
|
|
|
|
|
+////// SavedDetailFragment f = (SavedDetailFragment)getSupportFragmentManager().findFragmentById(R.id.tab2);
|
|
|
|
|
+////
|
|
|
|
|
+//// SavedSearchFragment search =(SavedSearchFragment) f;
|
|
|
|
|
+//// search.clear_result();
|
|
|
|
|
+//// search.reload_adapter();
|
|
|
|
|
+// SavedDocumentsFragment search =(SavedDocumentsFragment) f;
|
|
|
|
|
+// ((SavedDocumentsFragment) f).clear();
|
|
|
// }
|
|
// }
|
|
|
-//// else if(function_name.equals("Saved Documents"))
|
|
|
|
|
-//// {
|
|
|
|
|
-////// db.execSQL("delete from favorites");
|
|
|
|
|
-//////// SavedDetailFragment f = (SavedDetailFragment)getSupportFragmentManager().findFragmentById(R.id.tab2);
|
|
|
|
|
-//////
|
|
|
|
|
-////// SavedSearchFragment search =(SavedSearchFragment) f;
|
|
|
|
|
-////// search.clear_result();
|
|
|
|
|
-////// search.reload_adapter();
|
|
|
|
|
-//// SavedDocumentsFragment search =(SavedDocumentsFragment) f;
|
|
|
|
|
-//// ((SavedDocumentsFragment) f).clear();
|
|
|
|
|
-//// }
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// dbUtil.CloseDB(db);
|
|
|
|
|
-// dialog.dismiss();
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ dialog.dismiss();
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|