Cleanup extraneous print statements

codemagic-setup
Hank Grabowski 2022-12-29 09:33:22 -05:00
rodzic 36b92cc2e1
commit 9b7461e349
11 zmienionych plików z 6 dodań i 31 usunięć

Wyświetl plik

@ -28,7 +28,6 @@ class AppBottomNavBar extends StatelessWidget {
onTap: (index) {
final newButton = _indexToButton(index);
if (newButton == currentButton) {
print('same button do nothing');
return;
}

Wyświetl plik

@ -58,7 +58,6 @@ class MentionAutocompleteOptions extends StatelessWidget {
title: Text(user.name),
subtitle: Text('@${user.handle}'),
onTap: () {
print('tapped');
onMentionUserTap(user);
});
},

Wyświetl plik

@ -53,9 +53,7 @@ class NotificationControl extends StatelessWidget {
child: Icon(Icons.question_mark),
),
);
if (notification.type == NotificationType.reblog) {
print(notification);
}
return ListTile(
tileColor: notification.dismissed ? null : Colors.black12,
leading: GestureDetector(

Wyświetl plik

@ -178,9 +178,6 @@ class _StatusControlState extends State<StatusControl> {
onTapUrl: (url) async {
return await openUrlStringInSystembrowser(context, url, 'video');
},
onTapImage: (imageMetadata) {
print(imageMetadata);
},
);
}

Wyświetl plik

@ -20,7 +20,6 @@ class TimelinePanel extends StatelessWidget {
return Center(child: Text('Error getting timeline: ${result.error}'));
}
final items = result.value;
print('items count = ${items.length}');
return RefreshIndicator(
onRefresh: () async {
await manager.updateTimeline(timeline, TimelineRefreshType.refresh);

Wyświetl plik

@ -19,6 +19,8 @@ import 'services/secrets_service.dart';
import 'services/timeline_manager.dart';
import 'utils/app_scrolling_behavior.dart';
final _logger = Logger('Main');
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await dotenv.load(fileName: '.env');
@ -57,14 +59,12 @@ void main() async {
final wasLoggedIn = await authService.getStoredLoginState();
if (wasLoggedIn) {
final result = await authService.signIn(credentials);
print('Startup login result: $result');
if (result.isSuccess) {
print('Getting timeline for ${result.value.credentials.handle}');
timelineManager.updateTimeline(
TimelineIdentifiers.home(), TimelineRefreshType.loadOlder);
}
} else {
print('Was not logged in');
_logger.severe('Was not logged in');
}
});

Wyświetl plik

@ -3,9 +3,9 @@ import 'package:go_router/go_router.dart';
import 'globals.dart';
import 'screens/contacts_screen.dart';
import 'screens/editor.dart';
import 'screens/follow_request_adjudication_screen.dart';
import 'screens/gallery_browsers_screen.dart';
import 'screens/gallery_screen.dart';
import 'screens/follow_request_adjudication_screen.dart';
import 'screens/home.dart';
import 'screens/notifications_screen.dart';
import 'screens/post_screen.dart';
@ -44,16 +44,12 @@ final appRouter = GoRouter(
debugLogDiagnostics: true,
refreshListenable: _authService,
redirect: (context, state) async {
print('redirect handler');
final loggedIn = _authService.loggedIn;
print('$loggedIn ${state.location}');
if (!loggedIn && !allowedLoggedOut.contains(state.location)) {
print('Redirecting to sign in');
return ScreenPaths.signin;
}
if (loggedIn && allowedLoggedOut.contains(state.location)) {
print('Redirecting to home');
return ScreenPaths.timelines;
}
@ -124,7 +120,6 @@ final appRouter = GoRouter(
GoRoute(
path: '/post',
redirect: (context, state) {
print('post state redirect');
if (state.location == '/post') {
return '/post/new';
}
@ -150,7 +145,6 @@ final appRouter = GoRouter(
GoRoute(
path: '/comment',
redirect: (context, state) {
print('post state redirect');
if (state.location == '/comment') {
return '/comment/new';
}

Wyświetl plik

@ -20,7 +20,6 @@ class ImageViewerScreen extends StatelessWidget {
Future<void> saveImage(BuildContext context) async {
final appsDir = await getApplicationDocumentsDirectory();
final filename = p.basename(attachment.fullFileUri.path);
print(filename);
final bytesResult = await getIt<AuthService>()
.currentClient
.value
@ -34,15 +33,13 @@ class ImageViewerScreen extends StatelessWidget {
data: bytesResult.value,
fileName: filename,
);
final result = await FlutterFileDialog.saveFile(params: params);
print(result);
await FlutterFileDialog.saveFile(params: params);
} else {
final location = await FilePicker.platform.saveFile(
dialogTitle: 'Save Image',
fileName: filename,
initialDirectory: appsDir.path,
);
print(location);
if (location != null) {
await File(location).writeAsBytes(bytesResult.value);
}

Wyświetl plik

@ -95,7 +95,6 @@ class _SignInScreenState extends State<SignInScreen> {
void _signIn(BuildContext context) async {
if (formKey.currentState?.validate() ?? false) {
print('Attempting login...');
final result = await Credentials.buildFromHandle(
usernameController.text,
passwordController.text,

Wyświetl plik

@ -142,7 +142,6 @@ class _UserProfileScreenState extends State<UserProfileScreen> {
return;
}
setState(() {
print('Started updating/isupdating cycle');
isUpdating = true;
});
if (isAdding) {
@ -152,7 +151,6 @@ class _UserProfileScreenState extends State<UserProfileScreen> {
}
setState(() {
isUpdating = false;
print('Done updating/isupdating cycle');
});
},
);
@ -188,12 +186,10 @@ class _UserProfileScreenState extends State<UserProfileScreen> {
return;
}
setState(() {
print('Started updating/isupdating cycle');
isUpdating = true;
});
await manager.unfollow(profile);
setState(() {
print('Done updating/isupdating cycle');
isUpdating = false;
});
},
@ -212,12 +208,10 @@ class _UserProfileScreenState extends State<UserProfileScreen> {
return;
}
setState(() {
print('Started updating/isupdating cycle');
isUpdating = true;
});
await manager.follow(profile);
setState(() {
print('Done updating/isupdating cycle');
isUpdating = false;
});
},

Wyświetl plik

@ -59,7 +59,6 @@ class AuthService extends ChangeNotifier {
}
Future signOut() async {
print('Sign out');
await _setLoginState(false);
getIt<TimelineManager>().clear();
_friendicaClient = null;