another placeholder to avoid confusion
This commit is contained in:
parent
89597b6d2b
commit
b19005585d
@ -18,7 +18,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
bool _isSidebarOpen = true;
|
||||
bool querySearches = false;
|
||||
|
||||
List<String> _tabs = ['INBOX'];
|
||||
List<String> _tabs = ['Emails'];
|
||||
Map<String, Widget> _tabWidgets = {};
|
||||
TabController? _tabController;
|
||||
|
||||
@ -26,7 +26,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
void initState() {
|
||||
super.initState();
|
||||
_tabController = TabController(length: _tabs.length, vsync: this);
|
||||
_tabWidgets['INBOX'] = EmailPage(
|
||||
_tabWidgets['Emails'] = EmailPage(
|
||||
key: _emailPageKey,
|
||||
);
|
||||
}
|
||||
@ -45,7 +45,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
|
||||
// Remove a tab
|
||||
void _removeTab(int index) {
|
||||
if (_tabs[index] != 'INBOX') {
|
||||
if (_tabs[index] != 'Emails') {
|
||||
setState(() {
|
||||
String tabToRemove = _tabs[index];
|
||||
_tabs.removeAt(index);
|
||||
@ -99,8 +99,8 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
trailing: Text(email.date.toString()),
|
||||
onTap: () async {
|
||||
// print('tapped');
|
||||
String emailContent = await apiService
|
||||
.fetchEmailContent([email.id]);
|
||||
String emailContent =
|
||||
await apiService.fetchEmailContent([email.id]);
|
||||
// print('content below');
|
||||
// print(emailContent);
|
||||
Navigator.push(
|
||||
@ -278,7 +278,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||
child: Row(
|
||||
children: [
|
||||
Text(entry.value),
|
||||
if (entry.value != 'INBOX')
|
||||
if (entry.value != 'Emails')
|
||||
GestureDetector(
|
||||
onTap: () => _removeTab(entry.key),
|
||||
child: Icon(Icons.close, size: 16),
|
||||
|
Loading…
Reference in New Issue
Block a user