CyberShadow / DFeed

D news aggregator, newsgroup client, web newsreader and IRC bot
http://forum.dlang.org/help#about
380 stars 35 forks source link

Implement "narrow-index" view mode for mobile friendly group index #142

Closed ahmetsait closed 2 years ago

ahmetsait commented 2 years ago

Screenshot 2022-06-29 at 13-14-38 Issues group index Screen Shot 2022-06-29 at 13 13 24 Screen Shot 2022-06-29 at 13 11 39

ahmetsait commented 2 years ago

@CyberShadow should be in merge-able state now, anything else?

ahmetsait commented 2 years ago

Should be good to go, compiles and works on my system at least.

CyberShadow commented 2 years ago

It's here:

https://beta.forum.dlang.org/group/general

I just noticed the circlecrop. I suppose it's commonplace nowadays though it sticks out as inconsistent with the thread view.

Anyway, I don't see any serious problems so I'm going to push it to forum.dlang.org too.

CyberShadow commented 2 years ago

Done, feel free to announce it.

CyberShadow commented 2 years ago

@ahmetsait Unfortunately I had to revert because it's causing segmentation faults.

Breakpoint 2 at 0x7ffff5f5c6b0: file abort.c, line 49.

Program received signal SIGSEGV, Segmentation fault.
0x0000555555a2ba5d in void dfeed.web.web.view.group.discussionGroupNarrowIndex(immutable(dfeed.groups.Config.Group)*, int).summarizeThread(ref dfeed.web.web.view.group.discussionGroupNarrowIndex(immutable(dfeed.groups.Config.Group)*, int).Thread) (this=0x7fffffffb650, thread=...) at src/dfeed/web/web/view/group.d:268
268                     html.putEncodedEntities(idToUrl([thread.lastPost.id](http://thread.lastpost.id/)));

...

#0  0x0000555555a2ba5d in void dfeed.web.web.view.group.discussionGroupNarrowIndex(immutable(dfeed.groups.Config.Group)*, int).summarizeThread(ref dfeed.web.web.view.group.discussionGroupNarrowIndex(immutable(dfeed.groups.Config.Group)*, int).Thread) (this=0x7fffffffb650, thread=...) at src/dfeed/web/web/view/group.d:268
#1  0x0000555555a2aeb1 in void dfeed.web.web.view.group.discussionGroupNarrowIndex(immutable(dfeed.groups.Config.Group)*, int) (page=1, groupInfo=0x7ffff7eff000) at src/dfeed/web/web/view/group.d:320
#2  0x0000555555b56862 in [ae.net](http://ae.net/).http.common.HttpResponse dfeed.web.web.request.handleRequest(ae.net.http.common.HttpRequest, ae.net.http.server.HttpServerConnection) (conn=0x7fffeb4a1600, request=0x7fffeb64a700) at src/dfeed/web/web/request.d:262
#3  0x0000555555b54e3d in void dfeed.web.web.request.onRequest(ae.net.http.common.HttpRequest, ae.net.http.server.HttpServerConnection) (conn=0x7fffeb4a1600, request=0x7fffeb64a700) at src/dfeed/web/web/request.d:82
#4  0x00005555559aeb60 in void std.functional.DelegateFaker!(void function(ae.net.http.common.HttpRequest, ae.net.http.server.HttpServerConnection)*).DelegateFaker.doIt(ae.net.http.common.HttpRequest, ae.net.http.server.HttpServerConnection) (this=..., a1=0x7fffeb4a1600, a0=0x7fffeb64a700) at /home/dfeed/dlang/dmd-2.078.3/linux/bin64/../../src/phobos/std/functional.d-mixin-1300:1311
#5  0x0000555555b62b78 in void ae.net.http.server.HttpServerConnection.__ctor(ae.net.http.server.HttpServer, ae.net.asockets.TcpConnection, ae.net.asockets.IConnection, immutable(char)[]).__lambda5(ae.net.http.common.HttpRequest) (this=0x7fffeb4a97a0, r=0x7fffeb64a700) at lib/ae/net/http/server.d:546
#6  0x0000555555b61407 in void ae.net.http.server.BaseHttpServerConnection.processRequest(ae.utils.vec.Vec!(ae.sys.data.Data).Vec) (this=0x7fffeb4a1600, data=...) at lib/ae/net/http/server.d:191
#7  0x0000555555b611ca in void ae.net.http.server.BaseHttpServerConnection.onNewRequest(ae.sys.data.Data) (this=0x7fffeb4a1600, data=...) at lib/ae/net/http/server.d:142
#8  0x0000555555a00af2 in void ae.net.asockets.ConnectionAdapter.onReadData(ae.sys.data.Data) (this=0x7fffeb4a1700, data=...) at lib/ae/net/asockets.d:1877
#9  0x0000555555a01546 in void ae.net.asockets.TimeoutAdapter.onReadData(ae.sys.data.Data) (this=0x7fffeb4a1700, data=...) at lib/ae/net/asockets.d:2084
#10 0x00005555559fdac4 in ae.net.asockets.Connection.onReadable() (this=0x7fffeb4a1500) at lib/ae/net/asockets.d:871
#11 0x00005555559fd16e in void ae.net.asockets.SocketManager.handleEvent(std.socket.SocketSet, std.socket.SocketSet) (this=..., writeset=0x7ffff0abae40, readset=0x7ffff0abae00) at lib/ae/net/asockets.d:479
#12 0x00005555559fd031 in ae.net.asockets.SocketManager.loop() (this=...) at lib/ae/net/asockets.d:424
#13 0x00005555559a20be in D main (args=...) at src/dfeed/progs/dfeed.d:89

Note that lastPost may be null, which can happen if the last post in a thread had been deleted.

Please fix & resubmit.

ahmetsait commented 2 years ago

Ah, sorry. Will do.