diff --git a/app/Http/Controllers/Api/BaseApiController.php b/app/Http/Controllers/Api/BaseApiController.php index 2cc0cacdc..5ae8f9f68 100644 --- a/app/Http/Controllers/Api/BaseApiController.php +++ b/app/Http/Controllers/Api/BaseApiController.php @@ -44,15 +44,6 @@ class BaseApiController extends Controller $this->fractal->setSerializer(new ArraySerializer()); } - public function notification(Request $request, $id) - { - $notification = Notification::findOrFail($id); - $resource = new Fractal\Resource\Item($notification, new NotificationTransformer()); - $res = $this->fractal->createData($resource)->toArray(); - - return response()->json($res); - } - public function notifications(Request $request) { $pid = Auth::user()->profile->id; diff --git a/public/js/timeline.js b/public/js/timeline.js index 3a755cfea..095d723b3 100644 Binary files a/public/js/timeline.js and b/public/js/timeline.js differ diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 421186502..414ff4f1d 100644 Binary files a/public/mix-manifest.json and b/public/mix-manifest.json differ diff --git a/resources/assets/js/components/NotificationCard.vue b/resources/assets/js/components/NotificationCard.vue index 9c437bc8f..b5894f38d 100644 --- a/resources/assets/js/components/NotificationCard.vue +++ b/resources/assets/js/components/NotificationCard.vue @@ -70,7 +70,9 @@ }, mounted() { - this.fetchNotifications(); + if(window.outerWidth > 767) { + this.fetchNotifications(); + } }, updated() { diff --git a/resources/assets/js/components/Timeline.vue b/resources/assets/js/components/Timeline.vue index 34112e1e4..0d53b0b58 100644 --- a/resources/assets/js/components/Timeline.vue +++ b/resources/assets/js/components/Timeline.vue @@ -397,7 +397,9 @@ .then(res => { this.config = res.data; this.fetchTimelineApi(); - this.fetchProfile(); + if(window.outerWidth > 767) { + this.fetchProfile(); + } }); }, @@ -459,7 +461,9 @@ this.max_id = Math.min(...ids); $('.timeline .pagination').removeClass('d-none'); this.loading = false; - this.expRec(); + if(window.outerWidth > 767) { + this.expRec(); + } }).catch(err => { }); },