This commit is contained in:
2026-02-19 10:32:45 +00:00
parent a715199bbe
commit 526da66c5f
5 changed files with 9 additions and 46 deletions

View File

@@ -76,10 +76,5 @@ public class ClientDashboardActivity extends AppCompatActivity {
btnBack.setOnClickListener(v -> finish()); btnBack.setOnClickListener(v -> finish());
} }
} }
// Mantemos este método caso seja útil no futuro para feedback rápido.
// private void showToast(String message) {
// Toast.makeText(this, message, Toast.LENGTH_SHORT).show();
// }
} }

View File

@@ -75,10 +75,5 @@ public class EstablishmentDashboardActivity extends AppCompatActivity {
btnBack.setOnClickListener(v -> finish()); btnBack.setOnClickListener(v -> finish());
} }
} }
// Mantemos este método caso seja útil no futuro para feedback rápido.
// private void showToast(String message) {
// Toast.makeText(this, message, Toast.LENGTH_SHORT).show();
// }
} }

View File

@@ -160,13 +160,15 @@ public class GestaoStaffActivity extends AppCompatActivity {
btnAtribuir.setOnClickListener(v -> guardarAtribuicao()); btnAtribuir.setOnClickListener(v -> guardarAtribuicao());
} }
floatingActionButton.setOnClickListener(new View.OnClickListener() { if (floatingActionButton != null) {
@Override floatingActionButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) { @Override
Intent intent = new Intent(GestaoStaffActivity.this, AddStaffActivity.class); public void onClick(View v) {
startActivity(intent); Intent intent = new Intent(GestaoStaffActivity.this, AddStaffActivity.class);
} startActivity(intent);
}); }
});
}
} }
private void guardarAtribuicao() { private void guardarAtribuicao() {

View File

@@ -18,12 +18,9 @@ import androidx.core.view.WindowInsetsCompat;
import com.google.firebase.FirebaseApp; import com.google.firebase.FirebaseApp;
import com.google.firebase.auth.FirebaseAuth; import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.database.DataSnapshot; import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference; import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase; import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@@ -242,18 +239,6 @@ public class MainActivity extends AppCompatActivity {
return firstLetter + rest; return firstLetter + rest;
} }
private void enforceFirstAccountCreation() {
SharedPreferences prefs = getSharedPreferences(PREFS_NAME, MODE_PRIVATE);
hasCreatedAccount = prefs.getBoolean(KEY_HAS_CREATED_ACCOUNT, false);
if (!hasCreatedAccount) {
selectedAccountAction = AccountAction.CRIAR;
Toast.makeText(this, "Crie uma conta para começar a usar a app.", Toast.LENGTH_SHORT).show();
}
updateActionButtons();
}
private void markAccountCreated() { private void markAccountCreated() {
hasCreatedAccount = true; hasCreatedAccount = true;
SharedPreferences prefs = getSharedPreferences(PREFS_NAME, MODE_PRIVATE); SharedPreferences prefs = getSharedPreferences(PREFS_NAME, MODE_PRIVATE);
@@ -469,14 +454,4 @@ public class MainActivity extends AppCompatActivity {
} }
return true; return true;
} }
// @Override
// protected void onStart() {
// super.onStart();
// FirebaseUser firebaseUser = FirebaseAuth.getInstance().getCurrentUser();
// if (firebaseUser != null) {
// startActivity(new Intent(this, MainActivity.class));
// finish();
// }
// }
} }

View File

@@ -1,4 +0,0 @@
package com.example.pap_teste.models;
public class Client {
}