Ziomek64
Ziomek64
CC#
Created by Ziomek64 on 5/28/2023 in #help
❔ A property is changed even though it shouldn't?
What if i make apiListData serialized back to json and deserialize when needed? That should make "a copy". Idk how performant would that be with approx 500 items max, on mobile device
59 replies
CC#
Created by Ziomek64 on 5/28/2023 in #help
❔ A property is changed even though it shouldn't?
which lines were you talking about
59 replies
CC#
Created by Ziomek64 on 5/28/2023 in #help
❔ A property is changed even though it shouldn't?
on that last console.writeline apiListData is affected as before again
59 replies
CC#
Created by Ziomek64 on 5/28/2023 in #help
❔ A property is changed even though it shouldn't?
I'm populating tmp with lists from apiListData
59 replies
CC#
Created by Ziomek64 on 5/28/2023 in #help
❔ A property is changed even though it shouldn't?
Am i doing it wrong again?
GraphQLResponse<Data> filt = apiListData;

var tmp = new List<List>();
foreach (var list in apiListData.Data.MediaListCollection.lists)
{
tmp.Add(list);
}

foreach (var List in tmp)
{
foreach (var listEntry in List.entries)
{
listEntry.CustomListsList = new ObservableCollection<customListItem>();
if (listEntry.CustomLists != null)
{
foreach (var VARIABLE in listEntry.CustomLists)
{
listEntry.CustomListsList.Add(
new customListItem
{
key = VARIABLE.Key,
value = VARIABLE.Value
}
);
}
}
}
}

var filtered = tmp;

foreach (var x in filtered)
{
x.entries = x.entries.Where(x => x.media.Title.UserPreferred.ToLowerInvariant().Contains(query.ToLowerInvariant()))
.ToList();
}
Console.WriteLine(filtered);
GraphQLResponse<Data> filt = apiListData;

var tmp = new List<List>();
foreach (var list in apiListData.Data.MediaListCollection.lists)
{
tmp.Add(list);
}

foreach (var List in tmp)
{
foreach (var listEntry in List.entries)
{
listEntry.CustomListsList = new ObservableCollection<customListItem>();
if (listEntry.CustomLists != null)
{
foreach (var VARIABLE in listEntry.CustomLists)
{
listEntry.CustomListsList.Add(
new customListItem
{
key = VARIABLE.Key,
value = VARIABLE.Value
}
);
}
}
}
}

var filtered = tmp;

foreach (var x in filtered)
{
x.entries = x.entries.Where(x => x.media.Title.UserPreferred.ToLowerInvariant().Contains(query.ToLowerInvariant()))
.ToList();
}
Console.WriteLine(filtered);
59 replies
CC#
Created by Ziomek64 on 5/28/2023 in #help
❔ A property is changed even though it shouldn't?
I don't have any add loop on lines 836-936 (when I get data from API) but I think I get your point, I'll try later when I get home
59 replies
CC#
Created by Ziomek64 on 5/28/2023 in #help
❔ A property is changed even though it shouldn't?
but you can reply
59 replies
CC#
Created by Ziomek64 on 5/28/2023 in #help
❔ A property is changed even though it shouldn't?
Will message tomorrow
59 replies
CC#
Created by Ziomek64 on 5/28/2023 in #help
❔ A property is changed even though it shouldn't?
I'm going to sleep, cause I'm tired
59 replies
CC#
Created by Ziomek64 on 5/28/2023 in #help
❔ A property is changed even though it shouldn't?
that seed thing
59 replies
CC#
Created by Ziomek64 on 5/28/2023 in #help
❔ A property is changed even though it shouldn't?
but where, I haven't ever used it
59 replies
CC#
Created by Ziomek64 on 5/28/2023 in #help
❔ A property is changed even though it shouldn't?
Where do I set break point then
59 replies
CC#
Created by Ziomek64 on 5/28/2023 in #help
❔ A property is changed even though it shouldn't?
yes
59 replies
CC#
Created by Ziomek64 on 5/28/2023 in #help
❔ A property is changed even though it shouldn't?
that observable is binded to collectionview but it one-way
59 replies
CC#
Created by Ziomek64 on 5/28/2023 in #help
❔ A property is changed even though it shouldn't?
that perhaps through that observable it changed
59 replies
CC#
Created by Ziomek64 on 5/28/2023 in #help
❔ A property is changed even though it shouldn't?
Yes i was trying to say that
59 replies
CC#
Created by Ziomek64 on 5/28/2023 in #help
❔ A property is changed even though it shouldn't?
And the setter is not accessed when that change happens, this is normal too?
59 replies
CC#
Created by Ziomek64 on 5/28/2023 in #help
❔ A property is changed even though it shouldn't?
Are you just correcting code or fixing my problem?
59 replies
CC#
Created by Ziomek64 on 5/28/2023 in #help
❔ A property is changed even though it shouldn't?
I want to keep apiListData untouched somehow
59 replies
CC#
Created by Ziomek64 on 5/28/2023 in #help
❔ A property is changed even though it shouldn't?
what do you suggest here
59 replies