mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
[CST-18964] fix double search
This commit is contained in:
@@ -36,7 +36,6 @@ import { ViewMode } from '../view-mode.model';
|
||||
import { SearchService } from './search.service';
|
||||
import { SearchConfigurationService } from './search-configuration.service';
|
||||
import anything = jasmine.anything;
|
||||
import { MatomoTestingModule } from 'ngx-matomo-client/testing';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -57,7 +56,6 @@ describe('SearchService', () => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
MatomoTestingModule.forRoot(),
|
||||
RouterTestingModule.withRoutes([
|
||||
{ path: 'search', component: DummyComponent, pathMatch: 'full' },
|
||||
]),
|
||||
@@ -125,7 +123,6 @@ describe('SearchService', () => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
MatomoTestingModule.forRoot(),
|
||||
RouterTestingModule.withRoutes([
|
||||
{ path: 'search', component: DummyComponent, pathMatch: 'full' },
|
||||
]),
|
||||
|
@@ -1,7 +1,6 @@
|
||||
/* eslint-disable max-classes-per-file */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Angulartics2 } from 'angulartics2';
|
||||
import { MatomoTracker } from 'ngx-matomo-client';
|
||||
import {
|
||||
BehaviorSubject,
|
||||
combineLatest as observableCombineLatest,
|
||||
@@ -113,7 +112,6 @@ export class SearchService {
|
||||
private paginationService: PaginationService,
|
||||
private searchConfigurationService: SearchConfigurationService,
|
||||
private angulartics2: Angulartics2,
|
||||
private matomoTracker: MatomoTracker,
|
||||
) {
|
||||
this.searchDataService = new SearchDataService();
|
||||
}
|
||||
@@ -388,7 +386,6 @@ export class SearchService {
|
||||
},
|
||||
};
|
||||
|
||||
this.matomoTracker.trackSiteSearch(config.query, config.scope, searchQueryResponse.pageInfo.totalElements, searchTrackObject);
|
||||
this.angulartics2.eventTrack.next(searchTrackObject);
|
||||
}
|
||||
|
||||
|
@@ -46,7 +46,7 @@ export class MatomoService {
|
||||
const preferences$ = this.orejimeService.getSavedPreferences();
|
||||
|
||||
preferences$.subscribe(preferences => {
|
||||
this.changeMatomoConsent(preferences.matomo);
|
||||
this.changeMatomoConsent(preferences?.matomo);
|
||||
|
||||
if (environment.matomo?.siteId && environment.matomo?.trackerUrl) {
|
||||
this.matomoInitializer.initializeTracker({
|
||||
|
Reference in New Issue
Block a user