Skip to content

Commit

Permalink
minor fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
banditAmit committed Jul 28, 2024
1 parent 8ad9b89 commit cd07ea3
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
</intent-filter>
</receiver>
<receiver
android:name=".BugBazaarAddress"
android:name= ".message.BugBazaarAddress"
android:enabled="true"
android:exported="false">
<intent-filter>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/java/com/BugBazaar/controller/UserAuthSave.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ public class UserAuthSave {
private static SharedPreferences sharedPreferences1;

private static final String keypasscode_flag = "passcode_flag";
private static final String USER_DATA = "userCred";

private static SharedPreferences sharedPreferences;
private SessionManager sessionManager; // Move the initialization to a constructor
private static SharedPreferences sharedPreferences1;


public UserAuthSave(Context context) {
sharedPreferences = context.getSharedPreferences(USER_PREFERENCES, Context.MODE_PRIVATE);
Expand Down
15 changes: 15 additions & 0 deletions app/src/main/java/com/BugBazaar/message/BugBazaarAddress.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.BugBazaar.message;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;

public class BugBazaarAddress extends BroadcastReceiver
{
@Override
public void onReceive(Context context, Intent intent) {
Toast.makeText(context.getApplicationContext(), "Address has been saved Successfully", Toast.LENGTH_SHORT).show();
}
}

3 changes: 0 additions & 3 deletions app/src/main/java/com/BugBazaar/ui/Signin.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ public void onClick(View v) {
userAuthSave.saveUserData( randomToken,isLoggedin);
userAuthSave.saveuserCred(username,password);
sessionManager.setLoggedIn(true);
String randomToken = TokenGenerator.generateRandomToken(64);
userAuthSave.saveUserData( randomToken,isLoggedin);
userAuthSave.saveuserCred(username,password);
// Successful login, do something (e.g., start a new activity)
Toast.makeText(Signin.this, "Login successful!", Toast.LENGTH_SHORT).show();

Expand Down
9 changes: 1 addition & 8 deletions app/src/main/java/com/BugBazaar/ui/addresses/Address.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_address);
addressListLayout = findViewById(R.id.addressListLayout);

///





///


//Toolbar title set
Expand Down Expand Up @@ -100,7 +93,7 @@ public void onClick(View v) {
} else {
addressListLayout.removeAllViews();
// Insert data into the SQLite database

dbHelper.insertAddress(nickname, address);
sendacrosscomponents(nickname,address);
List<AddressItem> addresses = dbHelper.getAllAddresses();

Expand Down

0 comments on commit cd07ea3

Please sign in to comment.