Skip to content

Commit

Permalink
Merge pull request #52 from Krishna-Baldwa/lnf&comm_issues
Browse files Browse the repository at this point in the history
Lnf&comm_issues
  • Loading branch information
VIBR0X authored Dec 15, 2023
2 parents 9c8b980 + 9e43e37 commit 8c25e87
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# InstiApp
512167# InstiApp

Flutter App for Indian Institute of Technology, Bombay (for iOS support)

Expand Down
2 changes: 1 addition & 1 deletion lib/src/api/apiclient.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ part 'apiclient.g.dart';

//@rt.RestApi(baseUrl: "http://192.168.1.103:8000/api")
// @rt.RestApi(baseUrl: "http://10.105.177.150/api")
@rt.RestApi(baseUrl: "https://2ba5-103-21-127-77.ngrok-free.app/api")
@rt.RestApi(baseUrl: "https://gymkhana.iitb.ac.in/instiapp/api")
// @rt.RestApi(baseUrl: "https://272c-2405-201-5004-3c2f-d836-b028-6ac-ad9.ngrok-free.app/api")
abstract class InstiAppApi {
factory InstiAppApi(Dio dio, {String baseUrl}) = _InstiAppApi;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/api/apiclient.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions lib/src/blocs/community_post_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ class CommunityPostBloc {
// _communityPosts = defCommunities;
// _communitySubject.add(defCommunities);
// print("refresh");

_communitySubject.add([]);
if (id == null) {
_communitySubject.add([]);
return;
}

Expand All @@ -66,8 +67,8 @@ class CommunityPostBloc {
break;
}
_communityPosts = (await bloc.client.getCommunityPosts(
bloc.getSessionIdHeader(), status, query, id))
.data ??
bloc.getSessionIdHeader(), status, query, id))
.data ??
[];

// print("community" + _communityPosts.toString());
Expand Down
12 changes: 7 additions & 5 deletions lib/src/routes/communitydetails.dart
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import 'dart:async';

import 'package:InstiApp/src/api/model/community.dart';
import 'package:InstiApp/src/api/model/communityPost.dart';
import 'package:InstiApp/src/api/model/user.dart';
import 'package:InstiApp/src/blocs/community_bloc.dart';
import 'package:InstiApp/src/blocs/community_post_bloc.dart';
import 'package:InstiApp/src/api/model/communityPost.dart';
import 'package:InstiApp/src/routes/createpost_form.dart';
import 'package:InstiApp/src/utils/customappbar.dart';
import 'package:InstiApp/src/drawer.dart';
import 'package:InstiApp/src/routes/createpost_form.dart';
import 'package:InstiApp/src/utils/common_widgets.dart';
import 'package:InstiApp/src/utils/customappbar.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';

import '../bloc_provider.dart';

Expand Down Expand Up @@ -60,6 +60,7 @@ class _CommunityDetailsState extends State<CommunityDetails> {
});
}
});

}

@override
Expand Down Expand Up @@ -493,7 +494,8 @@ class _CommunityPostSectionState extends State<CommunityPostSection> {
var theme = Theme.of(context);
var bloc = BlocProvider.of(context)!.bloc;
var communityPostBloc = bloc.communityPostBloc;


loading=false;
if (firstBuild) {
communityPostBloc.query = "";
communityPostBloc.refresh(id: widget.community?.id);
Expand Down
2 changes: 2 additions & 0 deletions lib/src/routes/communitypostpage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class CommunityPostPage extends StatefulWidget {

static void navigateWith(BuildContext context, CommunityPostBloc bloc,
CommunityPost communityPost) {

Navigator.push(
context,

Expand Down Expand Up @@ -61,6 +62,7 @@ class _CommunityPostPageState extends State<CommunityPostPage> {

@override
Widget build(BuildContext context) {
initState();
ThemeData theme = Theme.of(context);
InstiAppBloc bloc = BlocProvider.of(context)!.bloc;

Expand Down
3 changes: 2 additions & 1 deletion lib/src/routes/lostandfoundfeedpage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,9 @@ class _LostpageState extends State<LostPage> {
Text(
(posts[index].claimed == true
? "Claimed"
: "Not claimed"),
: "Not\nclaimed"),
style: theme.textTheme.bodyText1,
textAlign: TextAlign.center,
)
],
)),
Expand Down

0 comments on commit 8c25e87

Please sign in to comment.