Auto-scrolling not working after upgrade to Catalina

An instant messenger which can connect to AIM, GTalk, Jabber, ICQ, and more.
spackleboy
Harmless
Posts: 1
Joined: Fri Oct 18, 2019 5:43 pm

Re: Auto-scrolling not working after upgrade to Catalina

Postby spackleboy » Fri Oct 18, 2019 5:45 pm

Incognitus wrote:
drbobbeaty wrote:
Incognitus wrote:I think Trolan is on to something. Here is my current change:

Code: Select all

      //Auto-scroll to bottom.  Use nearBottom to determine if a scrollToBottom is desired.
      function nearBottom() {
         //return ( document.body.scrollTop >= ( document.body.offsetHeight - ( window.innerHeight * 1.2 ) ) );
         return 1;
      }
      function scrollToBottom() {
         window.scrollTo(0, document.body.scrollHeight);
         //document.body.scrollTop = document.body.offsetHeight;
      }


I changed nearBottom to just return 1, just to see if we're modifying the right stuff, and auto scroll is now working for me. So just need to find the correct check for nearBottom. Or not. I don't really see a negative to just have it return 1 and always scroll.

So I guess we don't need to recompile Adium. That is going to be a huge undertaking.


I tried these changes on

Code: Select all

/Applications/Adium.app/Contents/Resources/Template.html
on the 1.5.10.3b1 version... it didn't solve my scrolling issues.


Make sure you're restarting Adium completely. Also you might need to upgrade to 10.5.10.4 (the latest). Other than that, not sure. It's working for me. I have 10% less work rage today already.



This worked for me!!!! Thank you!

User avatar
Robby
Cocoaforge Admin
Posts: 2597
Joined: Mon May 01, 2006 3:00 am

Re: Auto-scrolling not working after upgrade to Catalina

Postby Robby » Fri Oct 18, 2019 8:00 pm

Trolan wrote:I actually do have it compiling on Catalina, Xcode 11.1. The changes to sFlags fixes the syntax problems. There's a XIB which needs updating, but the build will complain about it. Find it, it'll ask if you want to update it, do so, and change the XIB to build for the Deployment Target. This is actually the case for many XIBs, but only resulting in a hard error for one. Past that point there's code signing issues, which can be worked through for the moment by setting code signing to automatic and then turning it off for each framework target and Adium.app, as well as the embedded AutoHyperlink.framework project. Then add in "--deep" for the additional code signing arguments in Build Settings for Adium.app. Additionally, I had code sign trip on unexpected resource data on items, so an 'xattr -rc' on the build directory sorted that.

It's definitely not perfect, and the codesgining is a problem for any actual distribution, but it's a start. Dark Mode with it is... interesting with all the custom UI styles. The rest of the issues are currently deprecations, and most of those are relatively simple changes from old APIs to more modern ones, or elimination of older functionality (such as IM attributes to Contacts).

Trolan, would you be willing to create pull requests at Adium's Bitbucket (link)? The other day, I created a branch for a prospective 1.5.10.5 release. Ideally,
- one PR for fixes relating to the "sFlags" syntax problems and the deployment target. Would setting the deployment target to 10.11 be doable? This is the newest macOS my machine supports and I'd like to be able to keep testing stuff until I can get a newer Mac.
- one PR for the bug fix.

I'm inquiring about codesigning on the developers' mailing list.

doomsday
Harmless
Posts: 8
Joined: Mon Oct 14, 2019 11:59 am

Re: Auto-scrolling not working after upgrade to Catalina

Postby doomsday » Fri Oct 18, 2019 8:13 pm

really sorry guys im not technical. can someone please explain me what i need to paste to
/Applications/Adium.app/Contents/Resources/Template.html

thanks a lot.

Trolan
Harmless
Posts: 6
Joined: Wed Oct 16, 2019 5:13 pm

Re: Auto-scrolling not working after upgrade to Catalina

Postby Trolan » Fri Oct 18, 2019 9:27 pm

Robby wrote:Trolan, would you be willing to create pull requests at Adium's Bitbucket (link)? The other day, I created a branch for a prospective 1.5.10.5 release. Ideally,
- one PR for fixes relating to the "sFlags" syntax problems and the deployment target. Would setting the deployment target to 10.11 be doable? This is the newest macOS my machine supports and I'd like to be able to keep testing stuff until I can get a newer Mac.
- one PR for the bug fix.

I'm inquiring about codesigning on the developers' mailing list.


I should be able to do that in the next day or two. Having 10.11 as a deployment target is helpful. I have a mini on 10.11 with Xcode8.2.1. I can see if that Xcode understands this project file, and if not, just re-apply the fixes to a clean checkout and associated project file that Xcode8 understands.

User avatar
Robby
Cocoaforge Admin
Posts: 2597
Joined: Mon May 01, 2006 3:00 am

Re: Auto-scrolling not working after upgrade to Catalina

Postby Robby » Fri Oct 18, 2019 11:01 pm

That would be fantastic!

Ractus
Harmless
Posts: 2
Joined: Sat Oct 19, 2019 4:51 am

Re: Auto-scrolling not working after upgrade to Catalina

Postby Ractus » Sat Oct 19, 2019 4:54 am

Hello!
I'm on Catalina, With Adium 1.5.10.4
I've made the modification to the template file and it's working when I type.
After I get a reply, is not working anymore, so it needs more fixing.

iampivot
Harmless
Posts: 1
Joined: Sat Oct 19, 2019 9:58 am

Re: Auto-scrolling not working after upgrade to Catalina

Postby iampivot » Sat Oct 19, 2019 10:01 am

Robby wrote:I've created a new branch called "adium-1.5.10.5". =-)


I tried checking out this branch and compiling under Catalina,but (after removing any i386 ARCH settings), am getting a build error;

** BUILD FAILED **


The following build commands failed:
CompileC /Users/thor/java/scratch/adium/build/Adium.build/Release-Debug/AIUtilities.framework.build/Objects-normal/x86_64/JVMarkedScroller.o /Users/thor/java/scratch/adium/Frameworks/AIUtilities\ Framework/Source/JVMarkedScroller.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
make: *** [adium] Error 65

Incognitus
Harmless
Posts: 8
Joined: Tue Oct 15, 2019 1:23 pm

Re: Auto-scrolling not working after upgrade to Catalina

Postby Incognitus » Sat Oct 19, 2019 1:15 pm

iampivot wrote:
Robby wrote:I've created a new branch called "adium-1.5.10.5". =-)


I tried checking out this branch and compiling under Catalina,but (after removing any i386 ARCH settings), am getting a build error;

** BUILD FAILED **


The following build commands failed:
CompileC /Users/thor/java/scratch/adium/build/Adium.build/Release-Debug/AIUtilities.framework.build/Objects-normal/x86_64/JVMarkedScroller.o /Users/thor/java/scratch/adium/Frameworks/AIUtilities\ Framework/Source/JVMarkedScroller.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
make: *** [adium] Error 65


I would recommend waiting until either Trolan or me or someone can get the code updated so it compiles.

That file is probably complaining about sFlags (unless you're on an older version of Xcode and it's a new error I'm not familiar with). I added the following function (from Trolan) to that file:

Code: Select all

- (BOOL)isHorizontalScroller {
    return self.enclosingScrollView.horizontalScroller == self;
}


And then changed each sFlags.isHoriz reference to self.isHorizontalScroller instead. That cleared up a lot of the errors in that particular file, tho I think there were a couple more minor things.

WhidbeyWayne
Harmless
Posts: 1
Joined: Sat Oct 19, 2019 7:55 pm

Re: Auto-scrolling not working after upgrade to Catalina

Postby WhidbeyWayne » Sat Oct 19, 2019 7:58 pm

doomsday wrote:really sorry guys im not technical. can someone please explain me what i need to paste to
/Applications/Adium.app/Contents/Resources/Template.html

thanks a lot.


Edit this file:

Code: Select all

vi /Applications/Adium.app/Contents/Resources/Template.html


Make these changes:

Code: Select all

 //Auto-scroll to bottom.  Use nearBottom to determine if a scrollToBottom is desired.
      function nearBottom() {
         //return ( document.body.scrollTop >= ( document.body.offsetHeight - ( window.innerHeight * 1.2 ) ) );
         return 1;
      }
      function scrollToBottom() {
         window.scrollTo(0, document.body.scrollHeight);
         //document.body.scrollTop = document.body.offsetHeight;
      }

Check to see if the function function scrollToBottom() is repeated in any message themes you may be using:

Code: Select all

grep -rnw Library/Application\ Support/Adium\ 2.0 -e scrollToBottom


If any are found, make the same change to function scrollToBottom().

Restart Adium.

Trolan
Harmless
Posts: 6
Joined: Wed Oct 16, 2019 5:13 pm

Re: Auto-scrolling not working after upgrade to Catalina

Postby Trolan » Sun Oct 20, 2019 12:46 am

PRs are in. There's no change to the project file as for building under 10.11 and Xcode 8, there are no changes needed. I haven't had an opportunity to try the Xcode11 project on Xcode8 to see how badly it blows up yet, this weekend. I spent that time finding a compatible series of JavaScript API accessors which work on El Cap and Catalina for the auto-scroll issue.

Build and run operations should work fine on Xcode8 with this code and project. Creating a project archive doesn't work, erring when trying to find PlistMacros.h, which would appear to not being created in the place Xcode expects during the archive process. That's an entirely different rabbit hole I don't have time to go down yet.

User avatar
Robby
Cocoaforge Admin
Posts: 2597
Joined: Mon May 01, 2006 3:00 am

Re: Auto-scrolling not working after upgrade to Catalina

Postby Robby » Sun Oct 20, 2019 1:17 am

Trolan wrote:PRs are in. There's no change to the project file as for building under 10.11 and Xcode 8, there are no changes needed. I haven't had an opportunity to try the Xcode11 project on Xcode8 to see how badly it blows up yet, this weekend. I spent that time finding a compatible series of JavaScript API accessors which work on El Cap and Catalina for the auto-scroll issue.

Build and run operations should work fine on Xcode8 with this code and project. Creating a project archive doesn't work, erring when trying to find PlistMacros.h, which would appear to not being created in the place Xcode expects during the archive process. That's an entirely different rabbit hole I don't have time to go down yet.

Great! Thanks a lot. I'll see if I can get someone to review the changes.

No worries. We're making progress. =-)

Ractus
Harmless
Posts: 2
Joined: Sat Oct 19, 2019 4:51 am

Re: Auto-scrolling not working after upgrade to Catalina

Postby Ractus » Tue Oct 22, 2019 8:36 am

@WhidbeyWayne - the solution os working on the default Message Style - Stockholm, thet uses the Template.html file

For other styles is not working, as each style has a footer.html file.

ex:
Renkoo.AdiumMessageStyle

Footer.html

Code: Select all

   // overload scrollingo for smooth scroll.
   var intervall_scroll;
   function scrollToBottom() {
      //document.body.scrollTop = (document.body.scrollHeight-window.innerHeight);
      //return;
      if ( intervall_scroll ) clearInterval( intervall_scroll );
      intervall_scroll = setInterval( function() {
         var target_scroll = (document.body.scrollHeight-window.innerHeight);
         var scrolldiff = target_scroll - document.body.scrollTop;
         if ( document.body.scrollTop != target_scroll ) {
            var saved_scroll = document.body.scrollTop;
            document.body.scrollTop += scrolldiff / 5 + ( scrolldiff >= 0 ? (scrolldiff != 0 ) : -1 );
         } else {
            saved_scroll = -1;
            clearInterval( intervall_scroll );
         }
      } , 10 );
      return;
   }

Trolan
Harmless
Posts: 6
Joined: Wed Oct 16, 2019 5:13 pm

Re: Auto-scrolling not working after upgrade to Catalina

Postby Trolan » Tue Oct 22, 2019 7:06 pm

The PR for the scroll fix also has a compatible change for Renkoo, as that was the only default style with an overload for scrollToBottom();

chesteroni
Harmless
Posts: 1
Joined: Wed Oct 23, 2019 8:57 am

Re: Auto-scrolling not working after upgrade to Catalina

Postby chesteroni » Wed Oct 23, 2019 9:00 am

There is also another bug: when I am in a "conference" (group chat) and someone posts a link, Clicking on it opens a new browser window instead of adding another "tab" in currently opened browser.

spelunker
Harmless
Posts: 11
Joined: Tue Oct 08, 2019 8:11 pm

Re: Auto-scrolling not working after upgrade to Catalina

Postby spelunker » Wed Oct 23, 2019 10:24 pm

chesteroni wrote:There is also another bug: when I am in a "conference" (group chat) and someone posts a link, Clicking on it opens a new browser window instead of adding another "tab" in currently opened browser.


I think one might start another thread on that with a view to filing it as a bug. It seems wisest to keep this thread for the unique content. I wonder if the moderator can split threads or whether this forum doesn't have that facility

bootOnWing
Harmless
Posts: 2
Joined: Thu Oct 24, 2019 4:46 am

Re: Auto-scrolling not working after upgrade to Catalina

Postby bootOnWing » Thu Oct 24, 2019 5:08 am

doomsday wrote:really sorry guys im not technical. can someone please explain me what i need to paste to
/Applications/Adium.app/Contents/Resources/Template.html

thanks a lot.


This is all that I show in my template.html file, am I missing something as well?

Code: Select all

%@

%@

cargusjoh
Harmless
Posts: 1
Joined: Sat Oct 26, 2019 10:22 pm

Re: Auto-scrolling not working after upgrade to Catalina

Postby cargusjoh » Sat Oct 26, 2019 10:44 pm

Hi two Macbook air laptops running Catalina. There are two scrolling bugs I experience, and one failure to execute bug. The scrolling ones are:
1. When other chatters add messages I have to manually scroll down to see it
2. When I scroll up, take hands off keyboard, others chat, the chat window won't hold the position


A=2017 Macbookair Catalina OS, Adium 1.5.10.4 (4/27/17) with Catalina fix (https://mac.softpedia.com/get/Internet- ... l#download CATALINA). Problem 1 is fixed. Problem 2 remains

B=2012 MacbookAir Catalina OS, Adium 1.5.10.4 (4/27/17). The Adium Catalina fix version won't run. I get "binary is damaged" recommending I move to trash. The checksum for the archive is the same as the archive on laptob A, and the checksum for that Adium executable is the same across them. So, I revererted back, and did the Template.html coding and that fixed problem 1. Problem 2 remains

Questions:
1. Has anyone else identified problem 2 also, and is it getting looked at?
2. Any idea why the Adium Catalina won't execute on laptop B?

Thanks for everyone's hard work!

doomsday
Harmless
Posts: 8
Joined: Mon Oct 14, 2019 11:59 am

Re: Auto-scrolling not working after upgrade to Catalina

Postby doomsday » Sun Oct 27, 2019 12:47 pm

bootOnWing wrote:
doomsday wrote:really sorry guys im not technical. can someone please explain me what i need to paste to
/Applications/Adium.app/Contents/Resources/Template.html

thanks a lot.


This is all that I show in my template.html file, am I missing something as well?

Code: Select all

%@

%@

same to me. have no idea what should i do :)

doomsday
Harmless
Posts: 8
Joined: Mon Oct 14, 2019 11:59 am

Re: Auto-scrolling not working after upgrade to Catalina

Postby doomsday » Wed Oct 30, 2019 8:29 pm

hi guys. any good news someone? :)

ecrist
Harmless
Posts: 1
Joined: Thu Oct 31, 2019 11:01 am

Re: Auto-scrolling not working after upgrade to Catalina

Postby ecrist » Thu Oct 31, 2019 11:23 am

Just added a semi-helpful note that patching the Tempate.html file "works for me".

For anyone having problems editing the file themselves, I've provided a patch here. Download the file Adium.patch.txt, and run the following commands:

Code: Select all

ecrist@meow:~-> cd /Applications/Adium.app
ecrist@meow:/Applications/Adium.app-> sudo patch -p0 < ~/Downloads/Adium.patch.txt
patching file Contents/Resources/Template.html
ecrist@meow:/Applications/Adium.app->


Adjust the paths as necessary.
Attachments
Adium.patch.txt
(856 Bytes) Downloaded 94 times


Return to “Adium”

Who is online

Users browsing this forum: Majestic-12 [Bot]